Skip to content

Commit d12a601

Browse files
committed
Add timeout for easier debugging
1 parent 5d5dbfc commit d12a601

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

channels/src/test/java/com/softwaremill/jox/StressTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.softwaremill.jox;
22

3+
import org.junit.jupiter.api.Timeout;
4+
35
import java.util.*;
46
import java.util.concurrent.*;
57

@@ -9,11 +11,13 @@
911

1012
public class StressTest {
1113
@TestWithCapacities
14+
@Timeout(10)
1215
void testMultipleOperationsDirect(int capacity) throws Exception {
1316
testAndVerify(capacity, true);
1417
}
1518

1619
@TestWithCapacities
20+
@Timeout(10)
1721
void testMultipleOperationsSelect(int capacity) throws Exception {
1822
testAndVerify(capacity, false);
1923
}
@@ -27,7 +31,7 @@ void testMultipleOperationsSelect(int capacity) throws Exception {
2731
*/
2832
private void testAndVerify(int capacity, boolean direct) throws Exception {
2933
boolean ci = System.getenv("CI") != null;
30-
System.out.println("Running in ci: " + ci);
34+
System.out.println("Running in ci: " + ci + "; capacity: " + capacity + "; direct: " + direct);
3135

3236
int numberOfRepetitions = ci ? 20 : 5;
3337
int numberOfThreads = 8;

0 commit comments

Comments
 (0)