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/03/29 20:21:58 UTC

[geode] 02/15: GEODE-4876: Remove use of Host from GetPidAndIdDistributedTest

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 034a279f67cd949333141ef8a729d567b6fe295b
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Mar 26 17:14:57 2018 -0700

    GEODE-4876: Remove use of Host from GetPidAndIdDistributedTest
---
 .../geode/test/dunit/tests/GetPidAndIdDistributedTest.java    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdDistributedTest.java b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdDistributedTest.java
index 1d1df64..b389538 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdDistributedTest.java
@@ -14,6 +14,8 @@
  */
 package org.apache.geode.test.dunit.tests;
 
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.apache.geode.test.dunit.VM.getVMCount;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import org.junit.ClassRule;
@@ -21,7 +23,6 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.internal.process.ProcessUtils;
-import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.rules.DistributedTestRule;
 import org.apache.geode.test.junit.categories.DistributedTest;
@@ -34,16 +35,16 @@ public class GetPidAndIdDistributedTest {
 
   @Test
   public void getId_returnsVMSequentialId() throws Exception {
-    for (int i = 0; i < Host.getHost(0).getVMCount(); i++) {
-      VM vm = Host.getHost(0).getVM(i);
+    for (int i = 0; i < getVMCount(); i++) {
+      VM vm = getVM(i);
       assertThat(vm.getId()).isEqualTo(i);
     }
   }
 
   @Test
   public void getPid_returnsVMProcessId() throws Exception {
-    for (int i = 0; i < Host.getHost(0).getVMCount(); i++) {
-      VM vm = Host.getHost(0).getVM(i);
+    for (int i = 0; i < getVMCount(); i++) {
+      VM vm = getVM(i);
       int remotePid = vm.invoke(() -> ProcessUtils.identifyPid());
       assertThat(vm.getPid()).isEqualTo(remotePid);
     }

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