use of org.eclipse.reddeer.common.wait.WaitWhile in project jbosstools-openshift by jbosstools.
the class CreateServerAdapterTest method waitTillApplicationIsRunning.
@BeforeClass
public static void waitTillApplicationIsRunning() {
new WaitWhile(new OpenShiftResourceExists(Resource.BUILD, "eap-app-1", ResourceState.RUNNING, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.getCustom(600));
new WaitUntil(new AmountOfResourcesExists(Resource.POD, 2, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.LONG, false);
cloneGitRepoAndImportProject();
}
use of org.eclipse.reddeer.common.wait.WaitWhile 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.common.wait.WaitWhile in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method rebuildProject.
private static void rebuildProject() {
PackageExplorerPart pexplorer = new PackageExplorerPart();
pexplorer.open();
pexplorer.getProject(PROJECT_NAME).select();
new ContextMenuItem("Maven", "Update Project...").select();
new WaitUntil(new ShellIsAvailable("Update Maven Project"), TimePeriod.LONG);
new CheckBox("Force Update of Snapshots/Releases").toggle(true);
new PushButton("OK").click();
new WaitWhile(new ShellIsAvailable("Update Maven Project"), TimePeriod.DEFAULT);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.common.wait.WaitWhile in project jbosstools-openshift by jbosstools.
the class NodeJSAppDebugTest method clean.
@After
public void clean() {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
pe.deleteAllProjects();
try {
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new ServerAdapter(Version.OPENSHIFT3, OpenShiftResources.NODEJS_SERVICE).delete();
} catch (OpenShiftToolsException ex) {
// do nothing, adapter does not exists
}
}
use of org.eclipse.reddeer.common.wait.WaitWhile in project jbosstools-openshift by jbosstools.
the class CreateApplicationOnBuilderImageTest method testCreateApplicationBasedOnBuilderImage.
@Test
public void testCreateApplicationBasedOnBuilderImage() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
new NewOpenShift3ApplicationWizard(connectionReq.getConnection()).openWizardFromExplorer();
BuilderImageApplicationWizardHandlingTest.nextToBuildConfigurationWizardPage();
applicationName = new LabeledText("Name: ").getText();
new WaitUntil(new ControlIsEnabled(new FinishButton()));
new FinishButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY));
CreateApplicationFromTemplateTest.importApplicationAndVerify(projectName);
OpenShiftProject project = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject();
project.refresh();
new WaitWhile(new JobIsRunning(), TimePeriod.getCustom(120));
new WaitUntil(new OpenShiftResourceExists(Resource.BUILD_CONFIG, connectionReq.getConnection()), TimePeriod.LONG, false);
List<OpenShiftResource> buildConfig = project.getOpenShiftResources(Resource.BUILD_CONFIG);
assertTrue("There should be precisely 1 build config for created application, but there is following amount" + " of build configs: " + buildConfig.size(), buildConfig.size() == 1);
List<OpenShiftResource> imageStream = project.getOpenShiftResources(Resource.IMAGE_STREAM);
assertTrue("There should be precisely 1 image stream for created application, but there is following amount" + " of image streams: " + imageStream.size(), imageStream.size() == 1);
List<OpenShiftResource> routes = project.getOpenShiftResources(Resource.ROUTE);
assertTrue("There should be precisely 1 route for created application, but there is following amount" + " of routes:" + routes.size(), routes.size() == 1);
assertTrue("Generated (default) route should contain application name, but it's not contained.", routes.get(0).getName().equals(applicationName));
List<OpenShiftResource> services = project.getOpenShiftResources(Resource.SERVICE);
assertTrue("There should be precisely 1 service for created application, but there is following amount" + " of services: " + services.size(), services.size() == 1);
}
Aggregations