You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "alex-plekhanov (via GitHub)" <gi...@apache.org> on 2023/09/14 12:42:39 UTC
[GitHub] [ignite] alex-plekhanov commented on a diff in pull request #10929: IGNITE-20327 Fix CQ event fields serialization for REMOVE/EXPIRY events omitting support of internal flag.
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org