use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning in project jbosstools-openshift by jbosstools.
the class CDKLaunchConfigurationTest method setupServerWizardPage.
@Override
protected void setupServerWizardPage(NewMenuWizard dialog) {
NewServerWizardPage page = new NewServerWizardPage(dialog);
page.selectType(SERVER_TYPE_GROUP, CDK32_SERVER_NAME);
page.setName(getServerAdapter());
dialog.next();
NewCDK32ServerWizardPage containerPage = new NewCDK32ServerWizardPage();
containerPage.setCredentials(USERNAME, PASSWORD);
log.info("Setting hypervisor to: " + hypervisor);
containerPage.setHypervisor(hypervisor);
log.info("Setting binary to " + CDK32_MINISHIFT);
containerPage.setMinishiftBinary(CDK32_MINISHIFT);
// here comes possibility to set profile while creating server adapter
log.info("Setting profile to: ");
containerPage.setMinishiftProfile("");
new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.MEDIUM, false);
}
use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning in project jbosstools-openshift by jbosstools.
the class CDKServerWizardAbstractTest method assertSameMessage.
protected void assertSameMessage(final NewMenuWizard dialog, final String message) {
new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.DEFAULT, false);
String description = dialog.getMessage();
assertTrue("Expected page description should contain text: " + message + " but has: " + description, description.contains(message));
}
use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning in project jbosstools-openshift by jbosstools.
the class CDKServer method operateServerState.
@Override
protected void operateServerState(String menuItem, final ServerState resultState) {
ServerState actualState = this.getLabel().getState();
MultipleWaitConditionHandler waitConditions = new MultipleWaitConditionHandler(waitConditionMatrix, " one of given wait condition is fulfilled");
TimePeriod timeout = TimePeriod.VERY_LONG;
if (menuItem == "Restart") {
timeout = TimePeriod.getCustom(480);
}
log.debug("Operate server's state from: + '" + actualState + "' to '" + menuItem + "'");
select();
new ContextMenuItem(menuItem).select();
// waiting until servers's state has changed from initial state into something else,
// ie. stopped -> starting or started -> stopping
new WaitWhile(new ServerHasState(this, actualState), TimePeriod.DEFAULT);
// we might expect that after the state is changed it should not go back into initial state
// or that problem dialog appears
// later on, we might get "Multiple problems have occurred" dialog
waitForProblemDialog(waitConditions, menuItem, TimePeriod.DEFAULT);
checkInitialStateChange(actualState);
// decide if we wait for SSL acceptance dialog
if ((actualState == ServerState.STOPPING || actualState == ServerState.STOPPED) && !getCertificatedAccepted()) {
new WaitUntil(waitConditions, TimePeriod.getCustom(1020));
}
new WaitUntil(new ServerHasState(this, resultState), timeout);
waitForProblemDialog(waitConditions, menuItem, TimePeriod.DEFAULT);
new WaitWhile(new SystemJobIsRunning(new JobMatcher("Inspecting CDK environment")), TimePeriod.DEFAULT);
log.debug("Operate server's state finished, the result server's state is: '" + getLabel().getState() + "'");
}
use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning in project jbosstools-openshift by jbosstools.
the class CDKServerEditorAbstractTest method checkEditorStateAfterSave.
protected void checkEditorStateAfterSave(String location, boolean canSave) {
LabeledText label = ((CDKPart) editor).getMinishiftBinaryLabel();
label.setText(location);
new WaitUntil(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.SHORT, false);
new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.DEFAULT, false);
if (canSave) {
verifyEditorCanSave();
} else {
verifyEditorCannotSave();
}
}
use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning in project jbosstools-openshift by jbosstools.
the class CDKServerWizardAbstractTest method assertDiffMessage.
protected void assertDiffMessage(final NewMenuWizard dialog, final String message) {
new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.DEFAULT, false);
String description = dialog.getMessage();
assertFalse("Page descrition should not contain: " + message, description.contains(message));
}
Aggregations