review comments

This commit is contained in:
Olivier Lamy 2022-11-16 20:57:07 +10:00
parent 1eb3cd91ab
commit 62746d9d44
No known key found for this signature in database
GPG Key ID: 873A8E86B4372146
1 changed files with 6 additions and 7 deletions

View File

@ -39,7 +39,6 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
import org.awaitility.Awaitility;
import org.awaitility.core.ConditionTimeoutException;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
@ -68,6 +67,8 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.awaitility.Awaitility.await;
/**
* <p>Helper class to test the Jetty Distribution</p>.
* <p>API can change without any further notice.</p>
@ -562,14 +563,13 @@ public class JettyHomeTester
{
try
{
Awaitility.await().atMost(time, unit).until(() -> logs.stream().anyMatch(s -> s.contains(txt)));
await().atMost(time, unit).until(() -> logs.stream().anyMatch(s -> s.contains(txt)));
return true;
}
catch (ConditionTimeoutException e)
{
// nothing
return false;
}
return false;
}
/**
@ -589,18 +589,17 @@ public class JettyHomeTester
thread.start();
try
{
Awaitility.await().atMost(time, unit).until(() -> logs.stream().anyMatch(s -> s.contains(txt)));
await().atMost(time, unit).until(() -> logs.stream().anyMatch(s -> s.contains(txt)));
return true;
}
catch (ConditionTimeoutException e)
{
// nothing
return false;
}
finally
{
logFileStreamer.stop();
}
return false;
}
/**