kgusakov commented on a change in pull request #706:
URL: https://github.com/apache/ignite-3/pull/706#discussion_r820117962



##########
File path: 
modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/ValueConditionTest.java
##########
@@ -57,4 +61,54 @@ public void ne() {
 
         assertTrue(cond.test(new Entry(KEY, VAL_2, 1, 1)));
     }
+
+    /**
+     * Tests that value is greater than another one.
+     */
+    @Test
+    public void gt() {
+        Condition cond = new ValueCondition(GREATER, KEY, VAL_1);
+
+        // byte[]{22} > byte[]{11}.
+        assertTrue(cond.test(new Entry(KEY, VAL_2, 1, 1)));

Review comment:
       I'd test some cases, when method returns false. At the moment, 
implementation `return true` will pass the test :)

##########
File path: 
modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServiceTest.java
##########
@@ -820,7 +823,80 @@ public void testMultiInvoke() throws Exception {
                 new StatementResult(false))));
 
         assertThat(resultIf.orElse().update(), upd(new Update(
-                Arrays.asList(new 
org.apache.ignite.internal.metastorage.server.Operation(OperationType.PUT, 
key2.bytes(), rval2)),
+                List.of(new 
org.apache.ignite.internal.metastorage.server.Operation(OperationType.PUT, 
key2.bytes(), rval2)),
+                new StatementResult(false))));
+    }
+
+    @Test
+    public void testMultiInvokeValueConditions() throws Exception {

Review comment:
       Due to the integration nature of this suite - I think we should avoid 
creation of many test methods with different combination of Conditions here. 
Conditions should be tested in according unit tests suites.
   
   But, I see, that you want to check integration of all parts for new value 
conditions - I think the good idea, just to extend current `testMultiInvoke` 
with the needed cases.




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