You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2018/04/23 05:46:51 UTC

[geode] 13/13: GEODE-5033: Fixup OverridingGetPropertiesDisconnectsAllDistributedTest

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

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit d66fd4fcbadeb3dc7dce45962d4de8db55ff2ac1
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Sun Apr 22 19:41:58 2018 -0700

    GEODE-5033: Fixup OverridingGetPropertiesDisconnectsAllDistributedTest
---
 ...ngGetPropertiesDisconnectsAllDistributedTest.java | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDistributedTest.java b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDistributedTest.java
index d2671ee..03ee489 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDistributedTest.java
@@ -16,9 +16,7 @@ package org.apache.geode.test.dunit.tests;
 
 import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
 import static org.apache.geode.test.dunit.Invoke.invokeInEveryVM;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import java.util.Properties;
 
@@ -38,12 +36,16 @@ public class OverridingGetPropertiesDisconnectsAllDistributedTest extends Distri
 
   @Override
   public final void preTearDownAssertions() throws Exception {
-    invokeInEveryVM(() -> assertNotNull(basicGetSystem()));
+    invokeInEveryVM(() -> {
+      assertThat(basicGetSystem().isConnected()).isTrue();
+    });
   }
 
   @Override
   public final void postTearDownAssertions() throws Exception {
-    invokeInEveryVM(() -> assertNull(basicGetSystem()));
+    invokeInEveryVM(() -> {
+      assertThat(basicGetSystem().isConnected()).isFalse();
+    });
   }
 
   @Override
@@ -55,7 +57,11 @@ public class OverridingGetPropertiesDisconnectsAllDistributedTest extends Distri
 
   @Test
   public void testDisconnects() throws Exception {
-    invokeInEveryVM(() -> assertFalse(getDistributedSystemProperties().isEmpty()));
-    invokeInEveryVM(() -> assertNotNull(getSystem()));
+    invokeInEveryVM(() -> {
+      assertThat(getDistributedSystemProperties()).isNotEmpty();
+    });
+    invokeInEveryVM(() -> {
+      assertThat(getSystem().isConnected()).isTrue();
+    });
   }
 }

-- 
To stop receiving notification emails like this one, please contact
klund@apache.org.