oleg-vlsk commented on code in PR #11793:
URL: https://github.com/apache/ignite/pull/11793#discussion_r1912379134
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsThinClientTest.java:
##########
@@ -199,6 +210,36 @@ private void checkCacheOperation(OperationType op,
Consumer<ClientCache<Object,
assertEquals(1, ops.get());
}
+ /**
+ * Cache {@link TcpClientCache#putAllConflict} operation perfomed
+ * @param map {@link Map} with entries for cache put all.
+ * @return cache {@link Consumer<ClientCache>}.
+ */
+ private Consumer<ClientCache<Object, Object>> putAllConflict(Map<Integer,
Object> map) {
+ Map<Integer, T3<Object, GridCacheVersion, Long>> drMap = new
HashMap<>();
+
+ GridCacheVersion confl = new GridCacheVersion(1, 0, 1, (byte)2);
+
+ map.forEach((key, value) -> drMap.put(key, new T3<>(value, confl,
CU.EXPIRE_TIME_ETERNAL)));
Review Comment:
Using forEach on a singleton map seems unnecessary, maybe something like
```
Map<Integer, T3<Object, GridCacheVersion, Long>> drMap1 = F.asMap(
F.firstEntry(map).getKey(),
new T3<>(F.firstValue(map), confl, CU.EXPIRE_TIME_ETERNAL));
```
Again, do we really need a map here as an argument?
--
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]