alex-plekhanov commented on code in PR #10929:
URL: https://github.com/apache/ignite/pull/10929#discussion_r1325891578


##########
modules/core/src/test/java/org/apache/ignite/internal/client/thin/CacheEntryListenersTest.java:
##########
@@ -771,6 +797,15 @@ public void assertNextCacheEvent(EventType expType, K 
expKey, V expVal) throws E
             assertEquals(expVal, evt.getValue());
         }
 
+        /** */
+        public void assertNextCacheEventDataNotReceived(EventType expType, 
String name) throws Exception {

Review Comment:
   Confusing method name. And looks like we check some internal state instead 
of external behaviour. Also, logic related to class field names and reflection 
is fragile. Can we implement something like:
   ```
           public void assertNextCacheEvent(EventType expType, 
Consumer<CacheEntryEvent<? extends K, ? extends V>> checker) throws Exception {
               CacheEntryEvent<? extends K, ? extends V> evt = poll();
   
               assertEquals(expType, evt.getEventType());
   
               checker.accept(evt);
           }
   ```
   And use it:
   ```
               lsnr.assertNextCacheEvent(EventType.REMOVED, evt -> 
assertSame(evt.getValue(), evt.getOldValue()));
   ```
   ?



-- 
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