alb3rtobr commented on a change in pull request #6182:
URL: https://github.com/apache/geode/pull/6182#discussion_r600668460



##########
File path: 
geode-core/src/test/java/org/apache/geode/internal/DataSerializableJUnitTest.java
##########
@@ -2255,63 +2259,83 @@ public void testSupportedClasses() throws Exception {
     try {
       Object o = new NonDataSerializable(new Random());
       DataSerializer.writeObject(o, getDataOutput());
-      assertTrue(Class_testSupportedClasses2.wasInvoked);
-      assertTrue(Class_testSupportedClasses2.toDataInvoked);
-      assertFalse(Class_testSupportedClasses2.fromDataInvoked);
+      assertThat(Class_testSupportedClasses2.wasInvoked).isTrue();
+      assertThat(Class_testSupportedClasses2.toDataInvoked).isTrue();
+      assertThat(Class_testSupportedClasses2.fromDataInvoked).isFalse();
 
       Object o2 = DataSerializer.readObject(getDataInput());
-      assertTrue(Class_testSupportedClasses2.fromDataInvoked);
-      assertEquals(o, o2);
+      assertThat(Class_testSupportedClasses2.fromDataInvoked).isTrue();
+      assertThat(o).isEqualTo(o2);
     } finally {
       InternalDataSerializer.unregister(id);
       InternalDataSerializer.unregister(id2);
     }
+
+    Class_testSupportedClasses2.wasInvoked = false;

Review comment:
       It is not exactly the same code. Each of the three failing tests is 
changing a different static class. `testSupportedClasses` is using 
`Class_testSupportedClasses2`, `testUDDS2` uses `Class_testSupportedClasses3` 
and `testUDDS4` uses `Class_testSupportedClasses4`.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to