This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit fe21934bd6dc7f3de6748a747c857ea0451f908c
Author: Alex Petrov <[email protected]>
AuthorDate: Mon Oct 21 13:51:46 2024 +0200

    Fix SavedCommandTest.
    
    After the serialization change that serializes "changed" before "is null", 
null flag can no be written.
---
 .../org/apache/cassandra/service/accord/SavedCommandTest.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/test/unit/org/apache/cassandra/service/accord/SavedCommandTest.java 
b/test/unit/org/apache/cassandra/service/accord/SavedCommandTest.java
index 3cfc1c91c5..0108cd9cac 100644
--- a/test/unit/org/apache/cassandra/service/accord/SavedCommandTest.java
+++ b/test/unit/org/apache/cassandra/service/accord/SavedCommandTest.java
@@ -89,8 +89,9 @@ public class SavedCommandTest
         Gen<AccordGenerators.CommandBuilder> gen = 
AccordGenerators.commandsBuilder();
         try (DataOutputBuffer out = new DataOutputBuffer())
         {
-            qt().forAll(gen).withSeed(3447978952908153749L).check(cmdBuilder 
-> {
-                int userVersion = 1; //TODO (maintance): where can we fetch 
all supported versions?
+            qt().forAll(gen)
+                .check(cmdBuilder -> {
+                int userVersion = 1; //TODO (maintenance): where can we fetch 
all supported versions?
                 SoftAssertions checks = new SoftAssertions();
                 for (SaveStatus saveStatus : SaveStatus.values())
                 {
@@ -138,9 +139,10 @@ public class SavedCommandTest
             checks.assertThat(SavedCommand.getFieldChanged(field, flags))
                   .describedAs("field %s changed", field)
                   .isFalse();
+            // Is null flag can not be set on a field that has not changed
             checks.assertThat(SavedCommand.getFieldIsNull(field, flags))
                   .describedAs("field %s not null", field)
-                  .isTrue();
+                  .isFalse();
         }
         checks.assertAll();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to