This is an automated email from the ASF dual-hosted git repository.
sergey-chugunov-1985 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 5fd444b0485 IGNITE-28034 Flaky
IgniteClusterSnapshotSelfTest#testClientHandlesSnapshotFailOnStartStage (#13720)
5fd444b0485 is described below
commit 5fd444b04859153810c348b4e384f1251062e636
Author: Vladimir Steshin <[email protected]>
AuthorDate: Mon Oct 26 10:02:11 2026 +0300
IGNITE-28034 Flaky
IgniteClusterSnapshotSelfTest#testClientHandlesSnapshotFailOnStartStage (#13720)
---
.../snapshot/IgniteClusterSnapshotSelfTest.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotSelfTest.java
index e5b34271f26..426b75a97cf 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotSelfTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotSelfTest.java
@@ -58,7 +58,9 @@ import org.apache.ignite.internal.NodeStoppingException;
import org.apache.ignite.internal.TestRecordingCommunicationSpi;
import org.apache.ignite.internal.events.DiscoveryCustomEvent;
import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.CacheGroupDescriptor;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
import
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
import
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId;
import
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
@@ -1344,7 +1346,7 @@ public class IgniteClusterSnapshotSelfTest extends
AbstractSnapshotSelfTest {
IgniteEx ignite = startGridsWithCache(grids, dfltCacheCfg,
CACHE_KEYS_RANGE);
- Ignite cln =
startClientGrid(optimize(getConfiguration(getTestIgniteInstanceName(grids))
+ IgniteEx cln =
startClientGrid(optimize(getConfiguration(getTestIgniteInstanceName(grids))
.setCacheConfiguration(dfltCacheCfg))
.setFailureHandler(new StopNodeFailureHandler()));
@@ -1358,6 +1360,8 @@ public class IgniteClusterSnapshotSelfTest extends
AbstractSnapshotSelfTest {
failNodeSpi.waitForBlocked(1, 10_000L);
+ AffinityTopologyVersion prevTop =
ignite.context().discovery().topologyVersionEx();
+
grid(1).close();
assertThrowsAnyCause(log,
@@ -1365,6 +1369,15 @@ public class IgniteClusterSnapshotSelfTest extends
AbstractSnapshotSelfTest {
ClusterTopologyException.class,
"Snapshot operation interrupted, because baseline node left the
cluster");
+ // The client refreshes its cache affinity asynchronously. A scan
query is mapped
+ // on the affinity topology version, so wait for it to advance,
otherwise the query
+ // can be mapped on the outdated topology still containing the left
node.
+ // Well wait for the client's topology version updates.
+ GridCacheContext<?, ?> clnCacheCtx =
cln.context().cache().internalCache(dfltCacheCfg.getName()).context();
+
+ assertTrue(waitForCondition(() ->
+
clnCacheCtx.affinity().affinityTopologyVersion().compareTo(cln.context().discovery().topologyVersionEx())
>= 0, 10_000L));
+
// Check that client node is alive.
assertSnapshotCacheKeys(cln.cache(dfltCacheCfg.getName()));
}