This is an automated email from the ASF dual-hosted git repository.
rpuch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new e42db6da299 IGNITE-25654 Fix
ZonePartitionReplicaListenerTest#writeIntentSwitchForCompactedCatalogTimestampWorks
(#6029)
e42db6da299 is described below
commit e42db6da299462370ef73760295831bd5140c95c
Author: Mikhail Efremov <[email protected]>
AuthorDate: Thu Jun 12 17:09:53 2025 +0600
IGNITE-25654 Fix
ZonePartitionReplicaListenerTest#writeIntentSwitchForCompactedCatalogTimestampWorks
(#6029)
---
.../distributed/replication/ZonePartitionReplicaListenerTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/replication/ZonePartitionReplicaListenerTest.java
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/replication/ZonePartitionReplicaListenerTest.java
index 084da965e1b..948f48b341a 100644
---
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/replication/ZonePartitionReplicaListenerTest.java
+++
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/replication/ZonePartitionReplicaListenerTest.java
@@ -230,7 +230,6 @@ import org.apache.ignite.tx.TransactionException;
import org.jetbrains.annotations.Nullable;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
@@ -1456,7 +1455,6 @@ public class ZonePartitionReplicaListenerTest extends
IgniteAbstractTest {
@ParameterizedTest
@ValueSource(booleans = {true, false})
@WithSystemProperty(key = COLOCATION_FEATURE_FLAG, value = "true")
- @Disabled("IGNITE-25654")
void writeIntentSwitchForCompactedCatalogTimestampWorks(boolean commit) {
int earliestVersion = 999;
Catalog mockEarliestCatalog = mock(Catalog.class);
@@ -1466,6 +1464,11 @@ public class ZonePartitionReplicaListenerTest extends
IgniteAbstractTest {
HybridTimestamp beginTs = beginTimestamp(txId);
HybridTimestamp commitTs = clock.now();
+ // We have to force push clock forward because we will invoke listener
directly bypassing ReplicaManager or MessageService, so clock
+ // won't be updated if the test computes too fast for physical clock
ticking and then we may have equal clock#current and the
+ // given above commit timestamp.
+ clock.update(commitTs);
+
HybridTimestamp reliableCatalogVersionTs = commit ? commitTs : beginTs;
when(catalogService.activeCatalog(reliableCatalogVersionTs.longValue())).thenThrow(new
CatalogNotFoundException("Oops"));
when(catalogService.earliestCatalog()).thenReturn(mockEarliestCatalog);