-
Notifications
You must be signed in to change notification settings - Fork 1.9k
IGNITE-28664 Fix failed tests in Disk Page Compressions 4 Suite #12913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,9 @@ public class IgniteClusterSnapshotHandlerTest extends IgniteClusterSnapshotResto | |
| /** Custom snapshot handlers. */ | ||
| private final List<SnapshotHandler<?>> handlers = new ArrayList<>(); | ||
|
|
||
| /** Timeout in milliseconds to await for snapshot operation being completed. */ | ||
| protected static final long TIMEOUT = 60_000; | ||
|
|
||
| /** Extensions plugin provider. */ | ||
| private final PluginProvider<PluginConfiguration> pluginProvider = new AbstractTestPluginProvider() { | ||
| @Override public String name() { | ||
|
|
@@ -84,7 +87,7 @@ public class IgniteClusterSnapshotHandlerTest extends IgniteClusterSnapshotResto | |
|
|
||
| /** {@inheritDoc} */ | ||
| @Override protected Function<Integer, Object> valueBuilder() { | ||
| return Integer::new; | ||
| return Integer::valueOf; | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -142,11 +145,13 @@ public void testClusterSnapshotHandlers() throws Exception { | |
|
|
||
| IgniteFuture<Void> fut = ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, null); | ||
|
|
||
| GridTestUtils.assertThrowsAnyCause(log, () -> fut.get(TIMEOUT), IgniteCheckedException.class, expMsg); | ||
| runWithLoggedThreadDump(() -> | ||
| GridTestUtils.assertThrowsAnyCause(log, () -> fut.get(TIMEOUT), IgniteCheckedException.class, expMsg)); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one coming from AbstractSnapshotSelfTest which is 15sec. I see you had only 1 run for Disk Page Compressions 5 which might not be enough. The timeout is not changed so I anticipate further failures. The ticket is for Disk 4, and the test fails on Disk 5, we should either fix Disk 5 as well and add it to the ticket description or remove this change. |
||
|
|
||
| changeMetadataRequestIdOnDisk(reqIdRef.get()); | ||
|
|
||
| ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, null).get(TIMEOUT); | ||
| runWithLoggedThreadDump(() -> | ||
| ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, null).get(TIMEOUT)); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
|
|
||
| assertCacheKeys(ignite.cache(DEFAULT_CACHE_NAME), CACHE_KEYS_RANGE); | ||
| } | ||
|
|
@@ -212,7 +217,8 @@ public void testClusterSnapshotHandlerFailure() throws Exception { | |
|
|
||
| IgniteFuture<Void> fut = snp(ignite).createSnapshot(SNAPSHOT_NAME, null, false, onlyPrimary); | ||
|
|
||
| GridTestUtils.assertThrowsAnyCause(log, () -> fut.get(TIMEOUT), IgniteCheckedException.class, expMsg); | ||
| runWithLoggedThreadDump(() -> | ||
| GridTestUtils.assertThrowsAnyCause(log, () -> fut.get(TIMEOUT), IgniteCheckedException.class, expMsg)); | ||
|
|
||
| failCreateFlag.set(false); | ||
|
|
||
|
|
@@ -224,11 +230,13 @@ public void testClusterSnapshotHandlerFailure() throws Exception { | |
|
|
||
| IgniteFuture<Void> fut0 = ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, null); | ||
|
|
||
| GridTestUtils.assertThrowsAnyCause(log, () -> fut0.get(TIMEOUT), IgniteCheckedException.class, expMsg); | ||
| runWithLoggedThreadDump(() -> | ||
| GridTestUtils.assertThrowsAnyCause(log, () -> fut0.get(TIMEOUT), IgniteCheckedException.class, expMsg)); | ||
|
|
||
| failRestoreFlag.set(false); | ||
|
|
||
| ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, null).get(TIMEOUT); | ||
| runWithLoggedThreadDump(() -> | ||
| ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, null).get(TIMEOUT)); | ||
|
|
||
| assertCacheKeys(ignite.cache(DEFAULT_CACHE_NAME), CACHE_KEYS_RANGE); | ||
| } | ||
|
|
@@ -406,7 +414,8 @@ public void testHandlerSnapshotLocation() throws Exception { | |
| ignite.destroyCache(DEFAULT_CACHE_NAME); | ||
| awaitPartitionMapExchange(); | ||
|
|
||
| snpMgr.restoreSnapshot(snpName, snpDir.getAbsolutePath(), null).get(TIMEOUT); | ||
| runWithLoggedThreadDump(() -> | ||
| snpMgr.restoreSnapshot(snpName, snpDir.getAbsolutePath(), null).get(TIMEOUT)); | ||
| } | ||
| finally { | ||
| U.delete(snpDir); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,9 @@ | |
| * Cluster-wide snapshot test check command with indexes. | ||
| */ | ||
| public class IgniteClusterSnapshotCheckWithIndexesTest extends AbstractSnapshotSelfTest { | ||
| /** Timeout in milliseconds to await for snapshot operation being completed. */ | ||
| protected static final long TIMEOUT = 60_000; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question as for IgniteClusterSnapshotHandlerTest. The ticket description mentions covering only Disk 4 tests, but this PR modifies
|
||
|
|
||
| /** @throws Exception If fails. */ | ||
| @Test | ||
| public void testClusterSnapshotCheckEmptyCache() throws Exception { | ||
|
|
@@ -87,7 +90,9 @@ public void testClusterSnapshotCheckWithNodeFilter() throws Exception { | |
| cache2.put(i, new Account(i, i)); | ||
| } | ||
|
|
||
| createAndCheckSnapshot(grid(0), SNAPSHOT_NAME, null, TIMEOUT); | ||
| runWithLoggedThreadDump(() -> | ||
| createAndCheckSnapshot(grid(0), SNAPSHOT_NAME, null, TIMEOUT) | ||
| ); | ||
|
|
||
| IdleVerifyResult res = grid(0).context().cache().context().snapshotMgr() | ||
| .checkSnapshot(SNAPSHOT_NAME, null).get().idleVerifyResult(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,9 @@ public class IgniteClusterSnapshotRestoreWithIndexingTest extends IgniteClusterS | |
| /** Number of cache keys to pre-create at node start. */ | ||
| private static final int CACHE_KEYS_RANGE = 10_000; | ||
|
|
||
| /** Timeout in milliseconds to await for snapshot operation being completed. */ | ||
| protected static final long TIMEOUT = 60_000; | ||
|
|
||
| /** {@inheritDoc} */ | ||
| @Override protected <K, V> CacheConfiguration<K, V> txCacheConfig(CacheConfiguration<K, V> ccfg) { | ||
| return super.txCacheConfig(ccfg).setSqlIndexMaxInlineSize(255).setSqlSchema("PUBLIC") | ||
|
|
@@ -74,7 +77,8 @@ public void testBasicClusterSnapshotRestore() throws Exception { | |
|
|
||
| IgniteEx client = startGridsWithSnapshot(2, CACHE_KEYS_RANGE, true); | ||
|
|
||
| grid(0).snapshot().restoreSnapshot(SNAPSHOT_NAME, Collections.singleton(DEFAULT_CACHE_NAME)).get(TIMEOUT); | ||
| runWithLoggedThreadDump(() -> | ||
| grid(0).snapshot().restoreSnapshot(SNAPSHOT_NAME, Collections.singleton(DEFAULT_CACHE_NAME)).get(TIMEOUT)); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one coming from AbstractSnapshotSelfTest which is 15sec. I see you had only 1 run for Disk Page Compressions 6 which might not be enough. The timeout is not changed so I anticipate further failures. The ticket is for Disk 4, and the test fails on Disk 6, we should either fix Disk 6 as well and add it to the ticket description or remove this change.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Timeouts unchanged. Test is failing on teamcity |
||
|
|
||
| // Only primary mode leads to index rebuild on restore. | ||
| // Must wait until index rebuild finish so subsequent checks will pass. | ||
|
|
@@ -101,7 +105,8 @@ public void testBasicClusterSnapshotRestoreWithMetadata() throws Exception { | |
|
|
||
| forceCheckpoint(); | ||
|
|
||
| ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, Collections.singleton(DEFAULT_CACHE_NAME)).get(TIMEOUT); | ||
| runWithLoggedThreadDump(() -> | ||
| ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, Collections.singleton(DEFAULT_CACHE_NAME)).get(TIMEOUT)); | ||
|
|
||
| // Only primary mode leads to index rebuild on restore. | ||
| // Must wait until index rebuild finish so subsequent checks will pass. | ||
|
|
@@ -126,7 +131,8 @@ public void testClusterSnapshotRestoreOnBiggerTopology() throws Exception { | |
|
|
||
| startGridsWithCache(nodesCnt - 2, CACHE_KEYS_RANGE, valueBuilder(), dfltCacheCfg); | ||
|
|
||
| grid(0).snapshot().createSnapshot(SNAPSHOT_NAME).get(TIMEOUT); | ||
| runWithLoggedThreadDump(() -> | ||
| grid(0).snapshot().createSnapshot(SNAPSHOT_NAME).get(TIMEOUT)); | ||
|
|
||
| startGrid(nodesCnt - 2); | ||
|
|
||
|
|
@@ -152,8 +158,8 @@ public void testClusterSnapshotRestoreOnBiggerTopology() throws Exception { | |
| forceCheckpoint(); | ||
|
|
||
| // Restore from an empty node. | ||
| ignite.snapshot().restoreSnapshot( | ||
| SNAPSHOT_NAME, Collections.singleton(DEFAULT_CACHE_NAME)).get(TIMEOUT); | ||
| runWithLoggedThreadDump(() -> ignite.snapshot().restoreSnapshot( | ||
| SNAPSHOT_NAME, Collections.singleton(DEFAULT_CACHE_NAME)).get(TIMEOUT)); | ||
|
|
||
| awaitPartitionMapExchange(); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify the scope of this PR? The ticket description mentions covering only Disk 4 tests, but this PR modifies
IgniteClusterSnapshotHandlerTest, which belongs to the Disk 5 suite.IgniteSnapshotMXBeanTestwhile we are at it?IgniteClusterSnapshotHandlerTestto keep this PR focused.