From 7fcea30957326b9a060a725e2abccb948c595627 Mon Sep 17 00:00:00 2001 From: Vaso Putica Date: Thu, 26 Sep 2024 11:39:36 -0500 Subject: [PATCH] Bug 36857931 - Build: TopicsStorageRecoveryTests.shouldRecoverAfterCleanStorageRestart timed out after 60m of inactivity (merge ce/main -> ce/24.09 @ 111609) [git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v24.09/": change = 111616] --- .../topics/TopicsStorageRecoveryTests.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/prj/test/functional/topics/src/main/java/topics/TopicsStorageRecoveryTests.java b/prj/test/functional/topics/src/main/java/topics/TopicsStorageRecoveryTests.java index 08e8b3310ec23..5a4b9b8252b6b 100644 --- a/prj/test/functional/topics/src/main/java/topics/TopicsStorageRecoveryTests.java +++ b/prj/test/functional/topics/src/main/java/topics/TopicsStorageRecoveryTests.java @@ -38,6 +38,9 @@ import com.oracle.coherence.common.base.Logger; import com.oracle.coherence.common.collections.ConcurrentHashMap; +import com.oracle.coherence.common.util.Threads; +import com.oracle.coherence.testing.junit.ThreadDumpOnTimeoutRule; + import com.tangosol.internal.net.topic.impl.paged.PagedTopicPublisher; import com.tangosol.io.ExternalizableLite; @@ -857,13 +860,26 @@ public int hashCode() @ClassRule public static TestLogs s_testLogs = new TestLogs(TopicsRecoveryTests.class); + private static CoherenceCluster s_storageCluster; + + /** + * A JUnit rule that will cause the test to fail if it runs too long. + * A thread dump will be generated on failure. + */ + @ClassRule + public static final ThreadDumpOnTimeoutRule timeout = ThreadDumpOnTimeoutRule.after(30, TimeUnit.MINUTES, () -> + s_storageCluster.forEach(member -> member.invoke(() -> + { + System.err.println(Threads.getThreadDump(true)); + return null; + }))); + private static final OptionsByType s_options = OptionsByType.of( SystemProperty.of("coherence.guard.timeout", 60000), CacheConfig.of("simple-persistence-bdb-cache-config.xml"), OperationalOverride.of("common-tangosol-coherence-override.xml"), SystemProperty.of("coherence.distributed.partitioncount", "13")); - private static CoherenceCluster s_storageCluster; private static Coherence s_coherence;