Skip to content

Commit 95b8e20

Browse files
author
Maksim Davydov
committed
thread dump on assertion error
1 parent 8078434 commit 95b8e20

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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
@@ -32,6 +32,7 @@
3232
import org.apache.ignite.internal.util.distributed.SingleNodeMessage;
3333
import org.apache.ignite.internal.util.typedef.F;
3434
import org.apache.ignite.internal.util.typedef.G;
35+
import org.apache.ignite.internal.util.typedef.internal.U;
3536
import org.apache.ignite.lang.IgniteFuture;
3637
import org.apache.ignite.mxbean.SnapshotMXBean;
3738
import org.apache.ignite.testframework.GridTestUtils;
@@ -122,8 +123,15 @@ public void testRestoreSnapshot() throws Exception {
122123
getMxBean(ignite.name(), SNAPSHOT_GROUP, SnapshotMXBeanImpl.class, SnapshotMXBean.class)
123124
.restoreSnapshot(SNAPSHOT_NAME, "", "");
124125

125-
assertTrue(GridTestUtils.waitForCondition(() -> (long)getMetric("endTime", mReg0) > 0, TIMEOUT));
126-
assertTrue(GridTestUtils.waitForCondition(() -> (long)getMetric("endTime", mReg1) > 0, TIMEOUT));
126+
try {
127+
assertTrue(GridTestUtils.waitForCondition(() -> (long)getMetric("endTime", mReg0) > 0, TIMEOUT));
128+
assertTrue(GridTestUtils.waitForCondition(() -> (long)getMetric("endTime", mReg1) > 0, TIMEOUT));
129+
}
130+
catch (AssertionError er) {
131+
U.dumpThreads(log);
132+
133+
throw er;
134+
}
127135

128136
assertCacheKeys(ignite.cache(DEFAULT_CACHE_NAME), CACHE_KEYS_RANGE);
129137
}

0 commit comments

Comments
 (0)