use of org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException in project jbosstools-openshift by jbosstools.
the class NodeJSAppDebugTest method testDebuggerStopsAtBreakpoint.
@Test
public void testDebuggerStopsAtBreakpoint() throws CoreException, IOException {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
pe.getProject(OpenShiftResources.NODEJS_GIT_NAME).getProjectItem("server.js").open();
new WaitUntil(new EditorWithTitleIsActive("server.js"));
TextEditor editor = new TextEditor("server.js");
setLineBreakpoint(editor, BREAKPOINT_LINE);
triggerDebugSession();
try {
new WaitUntil(new EditorWithTitleIsActive("server.js"), TimePeriod.LONG);
new WaitUntil(new CursorPositionIsOnLine(editor, BREAKPOINT_LINE));
} catch (WaitTimeoutExpiredException e) {
Assert.fail("Debugger hasn't stopped on breakpoint");
}
}
use of org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException 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);
}
use of org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException in project jbosstools-openshift by jbosstools.
the class CDKServer method confirmSSLCertificateDialog.
/**
* Methods waits for SSL Certificate dialog shell to appear and then confirms dialog,
* it might happen that certificate is already in place and no dialog is shown,
* then WaitTimeoutExpiredException is logged but not raised
*/
private void confirmSSLCertificateDialog(Shell shell) {
try {
DefaultShell certificateDialog = new DefaultShell(shell);
certificateDialog.setFocus();
log.info("SSL Certificate Dialog appeared during " + getLabel().getState().toString());
new PushButton(certificateDialog, "Yes").click();
new WaitWhile(new ShellIsAvailable(certificateDialog));
setCertificateAccepted(true);
} catch (WaitTimeoutExpiredException ex) {
String message = "WaitTimeoutExpiredException occured when handling Certificate dialog. " + "Dialog has not been shown";
log.error(message);
throw new CDKServerException(message, ex);
}
}
use of org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException in project jbosstools-openshift by jbosstools.
the class CDKServer method checkInitialStateChange.
private void checkInitialStateChange(ServerState actualState) {
try {
new WaitUntil(new ServerHasState(this, actualState), TimePeriod.DEFAULT);
String message = "Server's state went back to " + actualState;
throw new CDKServerException(message);
} catch (WaitTimeoutExpiredException exc) {
log.info("Server's state changed to " + this.getLabel().getState() + " and did not go back to " + actualState);
}
}
use of org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException in project jbosstools-openshift by jbosstools.
the class NewServerContainerWizardPage method disposeSecureStoragePassword.
@SuppressWarnings("unused")
private static void disposeSecureStoragePassword() {
try {
new WaitUntil(new ShellIsAvailable(SECURE_STORAGE), TimePeriod.MEDIUM, true);
new DefaultShell(SECURE_STORAGE).close();
new WaitWhile(new ShellIsAvailable(SECURE_STORAGE));
} catch (WaitTimeoutExpiredException exc) {
log.info("WaitTimeoutExpiredException occurred while waiting for Secure Storage Password dialog");
}
}
Aggregations