ARTEMIS-4328 add timeout to test which can hang
`org.apache.activemq.artemis.core.server.embedded.MainTest` expects the broker to throw a `java.io.IOException` when it is started due to its inability to find the file app/data/server.lock. However, if that files just happens to exist then the test will simply hang indefinitely. This commit adds a timeout to avoid hanging.
This commit is contained in:
parent
e59fb0233e
commit
b82419634a
|
@ -23,7 +23,7 @@ import org.junit.Test;
|
||||||
|
|
||||||
public class MainTest {
|
public class MainTest {
|
||||||
|
|
||||||
@Test(expected = IOException.class)
|
@Test(expected = IOException.class, timeout = 5000)
|
||||||
public void testNull() throws Exception {
|
public void testNull() throws Exception {
|
||||||
Main.main(new String[]{});
|
Main.main(new String[]{});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue