use of org.eclipse.reddeer.workbench.core.condition.JobIsKilled in project jbosstools-openshift by jbosstools.
the class ServerAdapterWizardHandlingTest method openNewServerAdapterWizard.
private void openNewServerAdapterWizard() {
NewServerWizard dialog = new NewServerWizard();
dialog.open();
NewServerWizardPage page = new NewServerWizardPage(dialog);
dialog.open();
new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
page.selectType(OpenShiftLabel.Others.OS3_SERVER_ADAPTER);
dialog.next();
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsKilled in project jbosstools-openshift by jbosstools.
the class CreateServerAdapterTest method finishNewServerAdapterWizardAndVerifyExistence.
public void finishNewServerAdapterWizardAndVerifyExistence() {
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.ADAPTER));
boolean jobExists = false;
try {
new WaitUntil(new JobIsRunning(new StringContains(JOB_NAME)), TimePeriod.getCustom(5));
jobExists = true;
} catch (WaitTimeoutExpiredException e) {
// job is not running, do nothing
}
if (jobExists) {
new WaitUntil(new JobIsKilled(JOB_NAME), TimePeriod.VERY_LONG);
}
assertTrue("OpenShift 3 server adapter was not created.", new ServerAdapterExists(Version.OPENSHIFT3, "eap-app", "Service").test());
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsKilled in project jbosstools-openshift by jbosstools.
the class NewCDKServerWizard method cancel.
@Override
public void cancel() {
try {
// wait for job to start
new WaitUntil(new JobIsRunning(), TimePeriod.MEDIUM);
// job has started - try to kill it
new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
} catch (WaitTimeoutExpiredException exc) {
// do nothing because job did not start
}
super.cancel();
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsKilled in project jbosstools-openshift by jbosstools.
the class Service method createServerAdapter.
/**
* Creates server adapter for this service with default values.
*/
public void createServerAdapter() {
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS));
new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsKilled in project jbosstools-openshift by jbosstools.
the class NewCDKServerWizard method finish.
@Override
public void finish(TimePeriod timeout) {
// workaround
try {
// wait for job to start
new WaitUntil(new JobIsRunning(), TimePeriod.MEDIUM);
// job has started - try to kill it
new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
} catch (WaitTimeoutExpiredException exc) {
// do nothing because job did not start
}
super.finish(timeout);
}
Aggregations