Skip to content

Commit ea3d57a

Browse files
author
Maksim Davydov
committed
thread dump on assertion error
1 parent 667cc11 commit ea3d57a

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotMXBeanTest.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.apache.ignite.configuration.IgniteConfiguration;
2525
import org.apache.ignite.internal.IgniteEx;
2626
import org.apache.ignite.internal.TestRecordingCommunicationSpi;
27+
import org.apache.ignite.internal.util.typedef.internal.U;
2728
import org.apache.ignite.mxbean.SnapshotMXBean;
2829
import org.apache.ignite.testframework.GridTestUtils;
2930
import org.junit.Test;
@@ -57,8 +58,15 @@ public void testRestoreSnapshot() throws Exception {
5758
getMxBean(ignite.name(), SNAPSHOT_GROUP, SnapshotMXBeanImpl.class, SnapshotMXBean.class)
5859
.restoreSnapshot(SNAPSHOT_NAME, "", "");
5960

60-
assertTrue(GridTestUtils.waitForCondition(() -> (long)getMetric("endTime", mReg0) > 0, TIMEOUT));
61-
assertTrue(GridTestUtils.waitForCondition(() -> (long)getMetric("endTime", mReg1) > 0, TIMEOUT));
61+
try {
62+
assertTrue(GridTestUtils.waitForCondition(() -> (long)getMetric("endTime", mReg0) > 0, TIMEOUT));
63+
assertTrue(GridTestUtils.waitForCondition(() -> (long)getMetric("endTime", mReg1) > 0, TIMEOUT));
64+
}
65+
catch (AssertionError er) {
66+
U.dumpThreads(log);
67+
68+
throw er;
69+
}
6270

6371
assertCacheKeys(ignite.cache(DEFAULT_CACHE_NAME), CACHE_KEYS_RANGE);
6472
}

0 commit comments

Comments
 (0)