Example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry.client HealthChecks HC_PORT

List of usage examples for org.springframework.ide.eclipse.boot.dash.cloudfoundry.client HealthChecks HC_PORT

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry.client HealthChecks HC_PORT.

Prototype

String HC_PORT

To view the source code for org.springframework.ide.eclipse.boot.dash.cloudfoundry.client HealthChecks HC_PORT.

Click Source Link

Usage

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

@Test
public void testRefreshAppsHealthCheck() throws Exception {
    CFClientParams targetParams = CfTestTargetParams.fromEnv();

    MockCFSpace space = clientFactory.defSpace(targetParams.getOrgName(), targetParams.getSpaceName());

    final MockCFApplication foo = space.defApp("foo");

    final CloudFoundryBootDashModel target = harness.createCfTarget(targetParams);

    waitForApps(target, "foo");

    CloudAppDashElement appElement = harness.getCfTargetModel().getApplication("foo");
    assertEquals(HealthChecks.HC_PORT, appElement.getHealthCheck());

    foo.setHealthCheck(HealthChecks.HC_NONE);

    target.refresh(ui);//from  w ww . ja v a2  s. c om

    new ACondition("wait for app health check", 3000) {
        @Override
        public boolean test() throws Exception {
            ImmutableSet<String> appNames = getNames(target.getApplications().getValues());
            assertEquals(ImmutableSet.of("foo"), appNames);

            CloudAppDashElement appElement = harness.getCfTargetModel().getApplication("foo");
            assertEquals(HealthChecks.HC_NONE, appElement.getHealthCheck());

            return true;
        }
    };
}