This is an automated email from the ASF dual-hosted git repository.
timoninmaxim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 83c3b0f768d IGNITE-23623 Fix ClassNotFoundException in
GridCacheAbstractSelfTest#afterTest (#11666)
83c3b0f768d is described below
commit 83c3b0f768d5f0fbb3a7626b033795007ab8ed1d
Author: Alexander Chesnokov <[email protected]>
AuthorDate: Mon Nov 25 10:32:48 2024 +0300
IGNITE-23623 Fix ClassNotFoundException in
GridCacheAbstractSelfTest#afterTest (#11666)
---
.../cache/GridCacheAbstractMetricsSelfTest.java | 8 -------
.../cache/GridCacheAbstractSelfTest.java | 27 +++++++---------------
2 files changed, 8 insertions(+), 27 deletions(-)
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
index 954583173e0..42c9049fd2e 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
@@ -158,14 +158,6 @@ public abstract class GridCacheAbstractMetricsSelfTest
extends GridCacheAbstract
@Override protected void afterTest() throws Exception {
super.afterTest();
- for (int i = 0; i < gridCount(); i++) {
- Ignite g = grid(i);
-
- g.cache(DEFAULT_CACHE_NAME).removeAll();
-
- assert g.cache(DEFAULT_CACHE_NAME).localSize() == 0;
- }
-
for (int i = 0; i < gridCount(); i++) {
Ignite g = grid(i);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index 44953e1d610..7fe86c2513c 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -140,24 +140,14 @@ public abstract class GridCacheAbstractSelfTest extends
GridCommonAbstractTest {
try {
final int fi = i;
- assertTrue(
- "Cache is not empty: " + " localSize = " +
jcache(fi).localSize(CachePeekMode.ALL)
- + ", local entries " +
entrySet(jcache(fi).localEntries()),
- GridTestUtils.waitForCondition(
- // Preloading may happen as nodes leave, so we
need to wait.
- new GridAbsPredicateX() {
- @Override public boolean applyx() throws
IgniteCheckedException {
- jcache(fi).removeAll();
-
- if (jcache(fi).size(CachePeekMode.ALL) >
0) {
- for (Cache.Entry<String, ?> k :
jcache(fi).localEntries())
- jcache(fi).remove(k.getKey());
- }
-
- return
jcache(fi).localSize(CachePeekMode.ALL) == 0;
- }
- },
- getTestTimeout()));
+ GridTestUtils.waitForCondition(
+ // Preloading may happen as nodes leave, so we need to
wait.
+ new GridAbsPredicateX() {
+ @Override public boolean applyx() {
+ jcache(fi).clear();
+ return jcache(fi).localSize(CachePeekMode.ALL)
== 0;
+ }
+ }, getTestTimeout());
int primaryKeySize =
jcache(i).localSize(CachePeekMode.PRIMARY);
int keySize = jcache(i).localSize();
@@ -191,7 +181,6 @@ public abstract class GridCacheAbstractSelfTest extends
GridCommonAbstractTest {
}
assert jcache().unwrap(Ignite.class).transactions().tx() == null;
- assertEquals("Cache is not empty", 0,
jcache().localSize(CachePeekMode.ALL));
if (storeStgy != null)
storeStgy.resetStore();