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

CW Issue #3152: Fix stability problems with Appsody Open Liberty tests #766

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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));
}
}