Fix suspected race condition causing test failures.

This commit is contained in:
Kris De Volder
2017-10-20 15:55:09 -07:00
parent 49904ceb3e
commit 963359fab6

View File

@@ -45,8 +45,10 @@ public class SpringBootAppTest {
@BeforeClass
public static void setupClass() throws Exception {
testAppRunner = startTestApplication(SpringBootAppTest.class.getResource("/"+appName+"-0.0.1-SNAPSHOT.jar"));
testApp = getAppContaining(appName);
assertNotNull(testApp);
ACondition.waitFor(TIMEOUT, () -> {
testApp = getAppContaining(appName);
assertNotNull(testApp);
});
}
private static AsyncProcess startTestApplication(URL jarUrl) throws Exception {