This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new a20e319  Improve ServletExampleTest.
a20e319 is described below

commit a20e319acf063d243276ed5fac94538c35581ab2
Author: Jean-Baptiste Onofré <[email protected]>
AuthorDate: Mon Dec 31 22:49:30 2018 +0100

    Improve ServletExampleTest.
---
 .../java/org/apache/karaf/itests/examples/ServletExampleTest.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/itests/test/src/test/java/org/apache/karaf/itests/examples/ServletExampleTest.java
 
b/itests/test/src/test/java/org/apache/karaf/itests/examples/ServletExampleTest.java
index d06d0da..99eb5dd 100644
--- 
a/itests/test/src/test/java/org/apache/karaf/itests/examples/ServletExampleTest.java
+++ 
b/itests/test/src/test/java/org/apache/karaf/itests/examples/ServletExampleTest.java
@@ -38,8 +38,11 @@ public class ServletExampleTest extends KarafTestSupport {
 
     private void verify() throws Exception {
         String command = executeCommand("http:list");
+        while (!command.contains("servlet-example")) {
+            Thread.sleep(200);
+            command = executeCommand("http:list");
+        }
         System.out.println(command);
-        assertContains("servlet-example", command);
 
         URL url = new URL("http://localhost:"; + getHttpPort() + 
"/servlet-example");
         HttpURLConnection connection = (HttpURLConnection) 
url.openConnection();

Reply via email to