Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
CW Issue #3152: Fix stability problems with Appsody Open Liberty tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eharris369 committed Jun 16, 2020
1 parent ad4e659 commit 54f3710
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,18 @@

package org.eclipse.codewind.test;

import org.eclipse.codewind.core.internal.constants.AppStatus;
import org.eclipse.codewind.test.util.CodewindUtil;
import org.eclipse.core.runtime.IPath;

public class AppsodyOpenLibertyAutoBuildTest extends BaseAppsodyAutoBuildTest {

@Override
public void doSetup() throws Exception {
protected void doSetup() throws Exception {
projectName = "appsodyopenlibertyautobuildtest";
projectType = APPSODY_PROJECT_TYPE;
templateId = APPSODY_OPEN_LIBERTY_ID;
relativeURL = "/starter/hello";
srcPath = "src/main/java/dev/appsody/starter/hello/Hello.java";
text1 = "World";
text2 = "Earth";
relativeURL = "/starter/resource";
srcPath = "src/main/java/dev/appsody/starter/StarterResource.java";
text1 = "StarterResource response";
text2 = "Hello from StarterResource";

super.doSetup();

IPath destPath = project.getLocation();
destPath = destPath.append(srcPath);
copyFile("appsodyOpenLiberty/Hello.java", destPath);
refreshProject(project);

// No build states for Appsody, check that app goes into starting state
// (may not for some project types so don't do an assert)
CodewindUtil.waitForAppState(app, AppStatus.STARTING, 15, 1);
assertTrue("App should be in started state", CodewindUtil.waitForAppState(app, AppStatus.STARTED, 300, 1));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,18 @@

package org.eclipse.codewind.test;

import org.eclipse.codewind.core.internal.constants.AppStatus;
import org.eclipse.codewind.test.util.CodewindUtil;
import org.eclipse.core.runtime.IPath;

public class AppsodyOpenLibertyDebugTest extends BaseAppsodyDebugTest {

@Override
protected void doSetup() throws Exception {
projectName = "appsodyopenlibertydebugtest";
projectType = APPSODY_PROJECT_TYPE;
templateId = APPSODY_OPEN_LIBERTY_ID;
relativeURL = "/starter/hello";
srcPath = "src/main/java/dev/appsody/starter/hello/Hello.java";
currentText = "World";
newText = "Earth";
relativeURL = "/starter/resource";
srcPath = "src/main/java/dev/appsody/starter/StarterResource.java";
currentText = "StarterResource response";
newText = "Greetings from StarterResource";

super.doSetup();

IPath destPath = project.getLocation();
destPath = destPath.append(srcPath);
copyFile("appsodyOpenLiberty/Hello.java", destPath);
refreshProject(project);

// No build states for Appsody, check that app goes into starting state
// (may not for some project types so don't do an assert)
CodewindUtil.waitForAppState(app, AppStatus.STARTING, 15, 1);
assertTrue("App should be in started state", CodewindUtil.waitForAppState(app, AppStatus.STARTED, 300, 1));
}
}

0 comments on commit 54f3710

Please sign in to comment.