NSAmelchev commented on code in PR #11793:
URL: https://github.com/apache/ignite/pull/11793#discussion_r1955044141


##########
modules/core/src/test/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsThinClientTest.java:
##########
@@ -171,6 +207,68 @@ public void testCacheOperation() throws Exception {
         checkCacheOperation(CACHE_GET_AND_REMOVE, cache -> 
cache.getAndRemove(5));
     }
 
+    /**
+     * Cache {@link TcpClientCache#putAllConflict} operation performed.
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testCachePutAllConflict() throws Exception {
+        checkCacheAllConflictOperations(CACHE_PUT_ALL_CONFLICT, false);
+    }
+
+    /**
+     * Cache {@link TcpClientCache#removeAllConflict} operation performed.
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testCacheRemoveAllConflict() throws Exception {
+        checkCacheAllConflictOperations(CACHE_REMOVE_ALL_CONFLICT, false);
+    }
+
+    /**
+     * Cache {@link TcpClientCache#putAllConflictAsync} operation performed.
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testCachePutAllConflictAsync() throws Exception {
+        checkCacheAllConflictOperations(CACHE_PUT_ALL_CONFLICT, true);
+    }
+
+    /**
+     * Cache {@link TcpClientCache#removeAllConflictAsync} operation performed.
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testCacheRemoveAllConflictAsync() throws Exception {
+        checkCacheAllConflictOperations(CACHE_REMOVE_ALL_CONFLICT, true);
+    }
+
+    /**
+     * @param opType {@link OperationType} cache operation type.
+     * @param isAsync boolean flag for asynchronous cache operation processing.
+     */
+    private void checkCacheAllConflictOperations(OperationType opType, boolean 
isAsync) throws Exception {
+        GridCacheVersion confl = new GridCacheVersion(1, 0, 1, (byte)2);
+
+        checkCacheOperation(opType, cache -> {
+            TcpClientCache<Object, Object> clientCache = 
(TcpClientCache<Object, Object>)cache;
+
+            try {
+                if (opType == CACHE_PUT_ALL_CONFLICT && !isAsync)
+                    clientCache.putAllConflict(F.asMap(6, new T3<>(1, confl, 
CU.EXPIRE_TIME_ETERNAL)));
+                else if (opType == CACHE_REMOVE_ALL_CONFLICT && !isAsync)
+                    clientCache.removeAllConflict(F.asMap(6, confl));
+                else if (opType == CACHE_PUT_ALL_CONFLICT)
+                    clientCache.putAllConflictAsync(F.asMap(7, new T3<>(2, 
confl, CU.EXPIRE_TIME_ETERNAL))).get();
+                else if (opType == CACHE_REMOVE_ALL_CONFLICT)
+                    clientCache.removeAllConflictAsync(F.asMap(7, 
confl)).get();
+            }
+            catch (InterruptedException | ExecutionException e) {

Review Comment:
   Lets use `ConsumerX` instead of catching.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to