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:
Justin Bertram 2023-06-23 09:10:44 -05:00 committed by Robbie Gemmell
parent e59fb0233e
commit b82419634a
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ import org.junit.Test;
public class MainTest {
@Test(expected = IOException.class)
@Test(expected = IOException.class, timeout = 5000)
public void testNull() throws Exception {
Main.main(new String[]{});
}