You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2017/10/11 21:11:47 UTC

[geode] branch develop updated: GEODE-3808 LonerDMJUnitTest.testMemberID fails if hostname lookup isn't working

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new cfe2208  GEODE-3808 LonerDMJUnitTest.testMemberID fails if hostname lookup isn't working
cfe2208 is described below

commit cfe220869aca0b6c3a5381765f977ad37d88844e
Author: Bruce Schuchardt <bs...@pivotal.io>
AuthorDate: Wed Oct 11 14:11:13 2017 -0700

    GEODE-3808 LonerDMJUnitTest.testMemberID fails if hostname lookup isn't working
    
    Removed host name assertions
---
 .../src/test/java/org/apache/geode/LonerDMJUnitTest.java  | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/geode-core/src/test/java/org/apache/geode/LonerDMJUnitTest.java b/geode-core/src/test/java/org/apache/geode/LonerDMJUnitTest.java
index 2cd928a..177b317 100644
--- a/geode-core/src/test/java/org/apache/geode/LonerDMJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/LonerDMJUnitTest.java
@@ -170,29 +170,14 @@ public class LonerDMJUnitTest {
     cfg.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "false");
     DistributedSystem ds = DistributedSystem.connect(cfg);
     System.out.println("MemberId = " + ds.getMemberId());
-    assertEquals(host.toString(), ds.getDistributedMember().getHost());
     assertEquals(OSProcess.getId(), ds.getDistributedMember().getProcessId());
     if (!PureJavaMode.isPure()) {
       String pid = String.valueOf(OSProcess.getId());
       assertTrue(ds.getMemberId().indexOf(pid) > -1);
     }
     assertTrue(ds.getMemberId().indexOf(name) > -1);
-    String memberid = ds.getMemberId();
-    String shortname = shortName(host);
-    assertTrue("'" + memberid + "' does not contain '" + shortname + "'",
-        memberid.indexOf(shortname) > -1);
     // make sure the loner port can be updated
     ((LonerDistributionManager) ((InternalDistributedSystem) ds).getDM()).updateLonerPort(100);
   }
 
-  private String shortName(String hostname) {
-    assertNotNull(hostname);
-    int index = hostname.indexOf('.');
-
-    if (index > 0 && !Character.isDigit(hostname.charAt(0)))
-      return hostname.substring(0, index);
-    else
-      return hostname;
-  }
-
 }

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].