Example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry CloudAppDashElement restartOnlyAsynch

List of usage examples for org.springframework.ide.eclipse.boot.dash.cloudfoundry CloudAppDashElement restartOnlyAsynch

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry CloudAppDashElement restartOnlyAsynch.

Prototype

public void restartOnlyAsynch(UserInteractions ui, CancelationToken cancelationToken) 

Source Link

Usage

From source file:org.springframework.ide.eclipse.boot.dash.test.CloudFoundryBootDashModelMockingTest.java

@Test
public void stopCancelsRestartOnly() throws Exception {
    CFClientParams targetParams = CfTestTargetParams.fromEnv();
    MockCFSpace space = clientFactory.defSpace(targetParams.getOrgName(), targetParams.getSpaceName());
    IProject project = projects.createProject("to-deploy");
    final String appName = "foo";
    space.defApp(appName);/* w  w w .ja  v  a 2 s  .  co m*/

    CloudFoundryBootDashModel model = harness.createCfTarget(targetParams);
    waitForApps(model, appName);
    CloudAppDashElement app = model.getApplication(appName);
    app.setProject(project);

    waitForApps(model, appName);

    clientFactory.setAppStartDelay(TimeUnit.MINUTES, 2);
    app.restartOnlyAsynch(ui, app.createCancelationToken());
    waitForState(app, RunState.STARTING, 3000);

    app.stopAsync(ui);
    waitForState(app, RunState.INACTIVE, 20000);
}