J-Bakuli commented on code in PR #10318:
URL: https://github.com/apache/ignite/pull/10318#discussion_r1034438791


##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java:
##########
@@ -58,122 +61,186 @@ public class AtomicOperationsInTxTest extends 
GridCommonAbstractTest {
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
         super.beforeTestsStarted();
+    }
 
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        super.beforeTest();
         startGrid(0);
     }
 
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+        stopGrid(0);
+    }
+
     /**
+     * Tests whether enabling atomic cache operations within transactions is 
allowed.
+     * Since 2.15.0 the default behaviour is set to {@code false}.
      * @throws Exception If failed.
      */
     @Test
+    @WithSystemProperty(key = IGNITE_ALLOW_ATOMIC_OPS_IN_TX, value = "false")
     public void testEnablingAtomicOperationDuringTransaction() throws 
Exception {
         GridTestUtils.assertThrows(log, (Callable<IgniteCache>)() -> {
             try (Transaction tx = grid(0).transactions().txStart()) {
                 return 
grid(0).cache(DEFAULT_CACHE_NAME).withAllowAtomicOpsInTx();
             }
         },
             IllegalStateException.class,
-            "Enabling atomic operations during active transaction is not 
allowed."
+            "Enabling atomic operations during active transaction is not 
allowed. Enable atomic operations before " +
+                    "transaction start."
         );
     }
 
     /**
+     * Tests whether allowing atomic cache operations before transaction 
starts does not cause exceptions.
+     * Since 2.15.0 the default behaviour is set to {@code false}.
+     * @throws Exception If failed.
+     */
+    @Test
+    @WithSystemProperty(key = IGNITE_ALLOW_ATOMIC_OPS_IN_TX, value = "true")
+    public void testAllowAtomicOperationsBeforeTransactionStarts() throws 
Exception {

Review Comment:
   thank you, I removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to