Skip to content

Commit 59c9eb3

Browse files
committed
Bug 36857931 - Build: TopicsStorageRecoveryTests.shouldRecoverAfterCleanStorageRestart timed out after 60m of inactivity (merge 14.1.1.2206 -> ce/22.06 @ 111614)
[git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v22.06/": change = 111626]
1 parent 552a908 commit 59c9eb3

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

prj/test/functional/topics/src/main/java/topics/TopicsStorageRecoveryTests.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
import com.oracle.coherence.common.base.Logger;
3939

4040
import com.oracle.coherence.common.collections.ConcurrentHashMap;
41+
import com.oracle.coherence.common.util.Threads;
42+
import com.oracle.coherence.testing.junit.ThreadDumpOnTimeoutRule;
43+
4144
import com.tangosol.internal.net.topic.impl.paged.PagedTopicPublisher;
4245
import com.tangosol.io.ExternalizableLite;
4346

@@ -857,13 +860,26 @@ public int hashCode()
857860
@ClassRule
858861
public static TestLogs s_testLogs = new TestLogs(TopicsRecoveryTests.class);
859862

863+
private static CoherenceCluster s_storageCluster;
864+
865+
/**
866+
* A JUnit rule that will cause the test to fail if it runs too long.
867+
* A thread dump will be generated on failure.
868+
*/
869+
@ClassRule
870+
public static final ThreadDumpOnTimeoutRule timeout = ThreadDumpOnTimeoutRule.after(30, TimeUnit.MINUTES, () ->
871+
s_storageCluster.forEach(member -> member.invoke(() ->
872+
{
873+
System.err.println(Threads.getThreadDump(true));
874+
return null;
875+
})));
876+
860877
private static final OptionsByType s_options = OptionsByType.of(
861878
SystemProperty.of("coherence.guard.timeout", 60000),
862879
CacheConfig.of("simple-persistence-bdb-cache-config.xml"),
863880
OperationalOverride.of("common-tangosol-coherence-override.xml"),
864881
SystemProperty.of("coherence.distributed.partitioncount", "13"));
865882

866-
private static CoherenceCluster s_storageCluster;
867883

868884
private static Coherence s_coherence;
869885

0 commit comments

Comments
 (0)