kirklund commented on a change in pull request #6013:
URL: https://github.com/apache/geode/pull/6013#discussion_r581375967



##########
File path: 
geode-core/src/test/java/org/apache/geode/internal/admin/remote/DistributionLocatorIdJUnitTest.java
##########
@@ -46,4 +48,25 @@ public void testEquals() throws UnknownHostException {
 
   }
 
+  @Test
+  public void testEquals_and_DetailCompare() throws UnknownHostException {
+    DistributionLocatorId dLI1 = new DistributionLocatorId(40404, "127.0.0.1", 
null);
+    DistributionLocatorId dLI2 =
+        new DistributionLocatorId(40404, "127.0.0.1", "127.0.1.0", "member2");;
+    DistributionLocatorId dLI3 = new DistributionLocatorId(40404, "127.0.0.1", 
null, "member3");
+    DistributionLocatorId dLI4 = new DistributionLocatorId(dLI3.marshal());
+
+    assertTrue(dLI1.equals(dLI2));
+    assertTrue(dLI1.equals(dLI3));
+    assertTrue(dLI1.equals(dLI4));
+
+    assertTrue(dLI1.getMemberName().equals(DistributionConfig.DEFAULT_NAME));
+    assertTrue(dLI2.getMemberName().equals("member2"));
+    assertTrue(dLI3.getMemberName().equals("member3"));
+    assertTrue(dLI4.getMemberName().equals(DistributionConfig.DEFAULT_NAME));
+
+    assertTrue(dLI1.detailCompare(dLI3));
+    assertFalse(dLI2.detailCompare(dLI4));

Review comment:
       Please use:
   ```
   assertThat(dLI2.detailCompare(dLI4)).isFalse();
   ```
   The failure message isn't any better but it's best if we consistently use 
AssertJ for all of the assertions.




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