Skip to content
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

IGNITE-20737: add method equals to PartitionUpdateCounterDebugWrapper #11052

Merged
merged 5 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3951,6 +3951,27 @@ public void testFailStopWarmUp() throws Exception {
assertEquals(EXIT_CODE_UNEXPECTED_ERROR, execute("--warm-up", "--stop"));
}

/** @throws Exception If fails. */
@Test
public void testCacheIdleVerifyLogLevelDebug() throws Exception {
IgniteEx ignite = startGrids(2);

ignite.cluster().state(ACTIVE);

IgniteCache<Object, Object> cache = ignite.createCache(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
.setAffinity(new RendezvousAffinityFunction(false, 32))
.setBackups(1));

cache.put("key", "value");

injectTestSystemOut();

setLoggerDebugLevel();

assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify"));
assertContains(log, testOut.toString(), "no conflicts have been found");
}

/**
* @param ignite Ignite to execute task on.
* @param delFoundGarbage If clearing mode should be used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,10 @@ public PartitionUpdateCounterDebugWrapper(int partId, PartitionUpdateCounter del
@Override public String toString() {
return delegate.toString();
}

/** {@inheritDoc} */
@Override public boolean equals(Object o) {
return o instanceof PartitionUpdateCounterDebugWrapper
&& delegate.equals(((PartitionUpdateCounterDebugWrapper)o).delegate);
}
}