review comments
This commit is contained in:
parent
1eb3cd91ab
commit
62746d9d44
|
@ -39,7 +39,6 @@ import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
|
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
|
||||||
import org.awaitility.Awaitility;
|
|
||||||
import org.awaitility.core.ConditionTimeoutException;
|
import org.awaitility.core.ConditionTimeoutException;
|
||||||
import org.codehaus.plexus.util.IOUtil;
|
import org.codehaus.plexus.util.IOUtil;
|
||||||
import org.codehaus.plexus.util.StringUtils;
|
import org.codehaus.plexus.util.StringUtils;
|
||||||
|
@ -68,6 +67,8 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import static org.awaitility.Awaitility.await;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Helper class to test the Jetty Distribution</p>.
|
* <p>Helper class to test the Jetty Distribution</p>.
|
||||||
* <p>API can change without any further notice.</p>
|
* <p>API can change without any further notice.</p>
|
||||||
|
@ -562,15 +563,14 @@ public class JettyHomeTester
|
||||||
{
|
{
|
||||||
try
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
catch (ConditionTimeoutException e)
|
catch (ConditionTimeoutException e)
|
||||||
{
|
{
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Awaits the logs file to contain the given text, for the given amount of time.
|
* Awaits the logs file to contain the given text, for the given amount of time.
|
||||||
|
@ -589,18 +589,17 @@ public class JettyHomeTester
|
||||||
thread.start();
|
thread.start();
|
||||||
try
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
catch (ConditionTimeoutException e)
|
catch (ConditionTimeoutException e)
|
||||||
{
|
{
|
||||||
// nothing
|
return false;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
logFileStreamer.stop();
|
logFileStreamer.stop();
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue