This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new b82419634a ARTEMIS-4328 add timeout to test which can hang
b82419634a is described below
commit b82419634ab5bcd9069d5bce09e554ca4a82b4b8
Author: Justin Bertram <[email protected]>
AuthorDate: Fri Jun 23 09:10:44 2023 -0500
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.
---
.../java/org/apache/activemq/artemis/core/server/embedded/MainTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/embedded/MainTest.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/embedded/MainTest.java
index 92e1d532ac..3ff3291755 100644
---
a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/embedded/MainTest.java
+++
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/embedded/MainTest.java
@@ -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[]{});
}