anton-vinogradov commented on code in PR #12889:
URL: https://github.com/apache/ignite/pull/12889#discussion_r2966444834
##########
modules/core/src/test/java/org/apache/ignite/internal/managers/communication/CacheEntryPredicateAdapterMessageTest.java:
##########
@@ -32,56 +35,88 @@ public class CacheEntryPredicateAdapterMessageTest {
/** */
@Test
public void testCacheEntryPredicateAdapterCode() {
- assertEquals(0, new CacheEntryPredicateAdapter().code());
- assertEquals(0, new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.OTHER).code());
- assertEquals(1, new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.VALUE).code());
- assertEquals(1, new
CacheEntryPredicateAdapter((CacheObject)null).code());
- assertEquals(2, new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.HAS_VALUE).code());
- assertEquals(3, new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.HAS_NO_VALUE).code());
- assertEquals(4, new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.ALWAYS_FALSE).code());
+ assertEquals(0, prepare(new CacheEntryPredicateAdapter()));
+ assertEquals(0, prepare(new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.OTHER)));
+ assertEquals(1, prepare(new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.VALUE)));
+ assertEquals(1, prepare(new
CacheEntryPredicateAdapter((CacheObject)null)));
+ assertEquals(2, prepare(new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.HAS_VALUE)));
+ assertEquals(3, prepare(new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.HAS_NO_VALUE)));
+ assertEquals(4, prepare(new
CacheEntryPredicateAdapter(CacheEntryPredicateAdapter.PredicateType.ALWAYS_FALSE)));
Review Comment:
That will not work for
```
for (CacheEntryPredicateAdapter.PredicateType t :
CacheEntryPredicateAdapter.PredicateType.values()) {
assertTrue(prepare(new CacheEntryPredicateAdapter(t)) >= 0);
assertTrue(prepare(new CacheEntryPredicateAdapter(t)) < 5);
}
```
--
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]