mhansonp commented on code in PR #7608:
URL: https://github.com/apache/geode/pull/7608#discussion_r857834272


##########
geode-core/src/distributedTest/java/org/apache/geode/cache/client/ClientServerRegisterInterestsDUnitTest.java:
##########
@@ -83,74 +79,62 @@ public final void postSetUp() throws Exception {
   public final void preTearDown() throws Exception {
     serverPort.set(0);
     entryEvents.clear();
-    gemfireServerVm.invoke(new SerializableRunnable() {
-      @Override
-      public void run() {
-        CacheFactory.getAnyInstance().close();
-      }
-    });
+    gemfireServerVm.invoke(() -> CacheFactory.getAnyInstance().close());
     gemfireServerVm = null;
   }
 
   private void setupGemFireCacheServer() {
-    Host localhost = Host.getHost(0);
 
-    gemfireServerVm = localhost.getVM(0);
+
+    gemfireServerVm = VM.getVM(0);
     serverPort.set(AvailablePortHelper.getRandomAvailableTCPPort());
 
-    gemfireServerVm.invoke(new SerializableRunnable() {
-      @Override
-      public void run() {
-        try {
-          Cache cache = new CacheFactory()
-              .set("name", 
"ClientServerRegisterInterestsTestGemFireServer").set(MCAST_PORT, "0")
-              .set(LOG_FILE, 
"clientServerRegisterInterestsTest.log").set(LOG_LEVEL, "config")
-              // .set("jmx-manager", "true")
-              // .set("jmx-manager-http-port", "0")
-              // .set("jmx-manager-port", "1199")
-              // .set("jmx-manager-start", "true")
-              .create();
+    gemfireServerVm.invoke(() -> {
+      try {
+        Cache cache = new CacheFactory()
+            .set("name", 
"ClientServerRegisterInterestsTestGemFireServer").set(MCAST_PORT, "0")
+            .set(LOG_FILE, 
"clientServerRegisterInterestsTest.log").set(LOG_LEVEL, "config")
+            .create();
 
-          RegionFactory<String, String> regionFactory = 
cache.createRegionFactory();
+        RegionFactory<String, String> regionFactory = 
cache.createRegionFactory();
 
-          regionFactory.setDataPolicy(DataPolicy.REPLICATE);
-          regionFactory.setKeyConstraint(String.class);
-          regionFactory.setValueConstraint(String.class);
+        regionFactory.setDataPolicy(DataPolicy.REPLICATE);
+        regionFactory.setKeyConstraint(String.class);
+        regionFactory.setValueConstraint(String.class);
 
-          Region<String, String> example = regionFactory.create("Example");
+        Region<String, String> example = regionFactory.create("Example");
 
-          assertNotNull("The 'Example' Region was not properly configured and 
initialized!",
-              example);
-          assertEquals(SEPARATOR + "Example", example.getFullPath());
-          assertEquals("Example", example.getName());
-          assertTrue(example.isEmpty());
+        assertNotNull("The 'Example' Region was not properly configured and 
initialized!",
+            example);
+        assertThat(example.getFullPath()).isEqualTo(SEPARATOR + "Example");
+        assertThat(example.getName()).isEqualTo("Example");
+        assertTrue(example.isEmpty());
 
-          example.put("1", "ONE");
+        example.put("1", "ONE");
 
-          assertFalse(example.isEmpty());
-          assertEquals(1, example.size());
+        assertFalse(example.isEmpty());

Review Comment:
   fixed.



##########
geode-core/src/distributedTest/java/org/apache/geode/cache/client/ClientServerRegisterInterestsDUnitTest.java:
##########
@@ -224,27 +205,27 @@ public void testClientRegisterInterests() {
       Region<String, String> example = clientCache.getRegion(SEPARATOR + 
"Example");
 
       assertNotNull("'Example' Region in Client Cache was not found!", 
example);
-      assertEquals(1, example.size());
+      assertThat(example.size()).isEqualTo(1);

Review Comment:
   Fixed.



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