4142434445464748495051
} public void actionPerformed(ActionEvent event) { Document doc = getDocument(); ScaleModel model = doc.getScaleModel(); model.scaleUp(); } public void scaleChanged(Scale scale) { Document doc = getDocument(); ScaleModel model = doc.getScaleModel();
205206207208209210211212213214215
ApplicationTestUtils.silentlyDestroyAllApplications(domain); IApplication application = domain.createApplication( ApplicationTestUtils.createRandomApplicationName(), LatestVersionOf.php().get(user), ApplicationScale.SCALE); // operation application.scaleUp(); // verification // there's currently no API to verify the application state }
217218219220221222223224225226227
public void shouldScaleDownApplication() throws Throwable { // pre-condition ApplicationTestUtils.silentlyDestroyAllApplications(domain); IApplication application = domain.createApplication( ApplicationTestUtils.createRandomApplicationName(), LatestVersionOf.php().get(user), ApplicationScale.SCALE); application.scaleUp(); // operation application.scaleDown(); // verification
192193194195196197198199200201202
ApplicationTestUtils.silentlyDestroyAllApplications(domain); IApplication application = domain.createApplication( ApplicationTestUtils.createRandomApplicationName(), LatestVersionOf.php().get(user), ApplicationScale.NO_SCALE); // operation application.scaleUp(); // verification // there's currently no API to verify the application state }
222223224225226227228229230231232
"Failed to add event scale-up to application springeap6 due to: Cannot scale a non-scalable application")); final IApplication app = domain.getApplicationByName("springeap6"); // operation try { app.scaleUp(); fail("Expected an exception here.."); } catch (OpenShiftEndpointException e) { // verifications assertThat(e.getCause()).isInstanceOf(InternalServerErrorException.class);