diff --git a/src/main/java/org/springframework/data/aerospike/server/version/ServerVersionSupport.java b/src/main/java/org/springframework/data/aerospike/server/version/ServerVersionSupport.java index db9ab225..0a3f95c7 100644 --- a/src/main/java/org/springframework/data/aerospike/server/version/ServerVersionSupport.java +++ b/src/main/java/org/springframework/data/aerospike/server/version/ServerVersionSupport.java @@ -90,7 +90,7 @@ public boolean isServerVersionGtOrEq7() { /** * @return true if Server version is 8.0 or greater */ - public boolean isMRTSupported() { + public boolean isTxnSupported() { return ModuleDescriptor.Version.parse(getServerVersion()) .compareTo(SERVER_VERSION_8_0_0_0) >= 0; } diff --git a/src/test/java/org/springframework/data/aerospike/transaction/reactive/ReactiveAerospikeTemplateTransactionTests.java b/src/test/java/org/springframework/data/aerospike/transaction/reactive/ReactiveAerospikeTemplateTransactionTests.java index 5dded26a..10366fb9 100644 --- a/src/test/java/org/springframework/data/aerospike/transaction/reactive/ReactiveAerospikeTemplateTransactionTests.java +++ b/src/test/java/org/springframework/data/aerospike/transaction/reactive/ReactiveAerospikeTemplateTransactionTests.java @@ -66,7 +66,7 @@ public class ReactiveAerospikeTemplateTransactionTests extends BaseReactiveInteg @BeforeAll public void beforeAll() { - TestUtils.checkAssumption(serverVersionSupport.isMRTSupported(), + TestUtils.checkAssumption(serverVersionSupport.isTxnSupported(), "Skipping transactions tests because Aerospike Server 8.0.0+ is required", log); } @@ -164,7 +164,7 @@ public void verifyMultipleWritesInTransactionWithTimeoutExpired() { .as(StepVerifier::create) .verifyErrorMatches(throwable -> { if (throwable instanceof RecoverableDataAccessException) { - return throwable.getMessage().contains("MRT expired"); + return throwable.getMessage().contains("Transaction expired"); } return false; }); @@ -185,7 +185,7 @@ public void verifyMultipleWritesInTransactionWithDefaultTimeoutExpired() { .as(StepVerifier::create) .verifyErrorMatches(throwable -> { if (throwable instanceof RecoverableDataAccessException) { - return throwable.getMessage().contains("MRT expired"); + return throwable.getMessage().contains("Transaction expired"); } return false; }); diff --git a/src/test/java/org/springframework/data/aerospike/transaction/reactive/ReactiveAerospikeTemplateTransactionUnitTests.java b/src/test/java/org/springframework/data/aerospike/transaction/reactive/ReactiveAerospikeTemplateTransactionUnitTests.java index f7878ea9..610a4a1d 100644 --- a/src/test/java/org/springframework/data/aerospike/transaction/reactive/ReactiveAerospikeTemplateTransactionUnitTests.java +++ b/src/test/java/org/springframework/data/aerospike/transaction/reactive/ReactiveAerospikeTemplateTransactionUnitTests.java @@ -76,7 +76,7 @@ public class ReactiveAerospikeTemplateTransactionUnitTests extends BaseReactiveI @BeforeAll public void beforeAll() { - TestUtils.checkAssumption(serverVersionSupport.isMRTSupported(), + TestUtils.checkAssumption(serverVersionSupport.isTxnSupported(), "Skipping transactions tests because Aerospike Server 8.0.0+ is required", log); when(mockTxManager.getReactiveTransaction(any())) .thenReturn(Mono.just( diff --git a/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTemplateTransactionTests.java b/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTemplateTransactionTests.java index 42e2f96e..9e51ec8c 100644 --- a/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTemplateTransactionTests.java +++ b/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTemplateTransactionTests.java @@ -65,7 +65,7 @@ public class AerospikeTemplateTransactionTests extends BaseBlockingIntegrationTe @BeforeAll public void beforeAll() { - TestUtils.checkAssumption(serverVersionSupport.isMRTSupported(), + TestUtils.checkAssumption(serverVersionSupport.isTxnSupported(), "Skipping transactions tests because Aerospike Server 8.0.0+ is required", log); } @@ -139,7 +139,7 @@ public void multipleWritesInTransactionWithTimeoutExpired() { template.save(new SampleClasses.DocumentWithIntegerId(115, "test2")); })) .isInstanceOf(RecoverableDataAccessException.class) - .hasMessageContaining("MRT expired"); + .hasMessageContaining("Transaction expired"); SampleClasses.DocumentWithIntegerId result = template.findById(115, SampleClasses.DocumentWithIntegerId.class); assertThat(result).isNull(); // No record is written because all commands were in the same transaction @@ -154,7 +154,7 @@ public void multipleWritesInTransactionWithDefaultTimeoutExpired() { template.save(new SampleClasses.DocumentWithIntegerId(124, "test2")); })) .isInstanceOf(RecoverableDataAccessException.class) - .hasMessageContaining("MRT expired"); + .hasMessageContaining("Transaction expired"); SampleClasses.DocumentWithIntegerId result = template.findById(124, SampleClasses.DocumentWithIntegerId.class); assertThat(result).isNull(); // No record is written because all commands were in the same transaction diff --git a/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTemplateTransactionUnitTests.java b/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTemplateTransactionUnitTests.java index 25a772c3..de451c97 100644 --- a/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTemplateTransactionUnitTests.java +++ b/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTemplateTransactionUnitTests.java @@ -61,7 +61,7 @@ public class AerospikeTemplateTransactionUnitTests extends BaseBlockingIntegrati @BeforeAll public void beforeAll() { - TestUtils.checkAssumption(serverVersionSupport.isMRTSupported(), + TestUtils.checkAssumption(serverVersionSupport.isTxnSupported(), "Skipping transactions tests because Aerospike Server 8.0.0+ is required", log); utils = new AerospikeTransactionTestUtils(client, template); } diff --git a/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTransactionalAnnotationTests.java b/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTransactionalAnnotationTests.java index 6b9e2b11..a1026056 100644 --- a/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTransactionalAnnotationTests.java +++ b/src/test/java/org/springframework/data/aerospike/transaction/sync/AerospikeTransactionalAnnotationTests.java @@ -48,7 +48,7 @@ public class AerospikeTransactionalAnnotationTests extends BaseBlockingIntegrati @BeforeAll public void beforeAll() { - TestUtils.checkAssumption(serverVersionSupport.isMRTSupported(), + TestUtils.checkAssumption(serverVersionSupport.isTxnSupported(), "Skipping transactions tests because Aerospike Server 8.0.0+ is required", log); } @@ -180,7 +180,7 @@ public void verifyTransaction_multipleInserts_withTimeoutExpired() { AwaitilityUtils.wait(3, SECONDS); // wait more than the given timeout assertThatThrownBy(() -> template.insert(new SampleClasses.DocumentWithPrimitiveIntId(306))) .isInstanceOf(RecoverableDataAccessException.class) - .hasMessageContaining("MRT expired"); + .hasMessageContaining("Transaction expired"); } @Test @@ -234,7 +234,7 @@ public void verifyTransaction_multipleBatchInserts_withTimeoutExpired() { template.insertAll(List.of(new SampleClasses.DocumentWithPrimitiveIntId(310), new SampleClasses.DocumentWithPrimitiveIntId(410))); } catch (AerospikeException.BatchRecordArray e) { - System.out.println("MRT expired"); + System.out.println("Transaction expired"); } }