geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [2/2] geode git commit: GEODE_1793 spotless fixes and removal of dead code
Date Mon, 13 Mar 2017 16:40:16 GMT
GEODE_1793 spotless fixes and removal of dead code


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/4112204a
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/4112204a
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/4112204a

Branch: refs/heads/develop
Commit: 4112204a9c256e72ff959cb93231765cb510d73d
Parents: 064362e
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Fri Mar 3 14:50:33 2017 -0800
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Mon Mar 13 08:43:59 2017 -0700

----------------------------------------------------------------------
 .../internal/tcpserver/TcpServer.java            |  6 +++---
 .../geode/distributed/LocatorDUnitTest.java      | 19 +------------------
 2 files changed, 4 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/4112204a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
index 8f1b537..9845bf1 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
@@ -89,7 +89,7 @@ public class TcpServer {
   // This GOSSIPVERSION is used in _getVersionForAddress request for getting GemFire version
of a
   // GossipServer.
   public final static int OLDGOSSIPVERSION = 1001;
-  
+
   private static/* GemStoneAddition */ final Map GOSSIP_TO_GEMFIRE_VERSION_MAP = new HashMap();
 
   // For test purpose only
@@ -364,8 +364,8 @@ public class TcpServer {
             sock.getOutputStream().write("unknown protocol version".getBytes());
             sock.getOutputStream().flush();
           } catch (IOException e) {
-            log.debug("exception in sending reply to process using unknown protocol "
-                + gossipVersion, e);
+            log.debug(
+                "exception in sending reply to process using unknown protocol " + gossipVersion,
e);
           }
           sock.close();
           return;

http://git-wip-us.apache.org/repos/asf/geode/blob/4112204a/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java
index 5812e74..6f01f90 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java
@@ -308,14 +308,11 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   private Boolean startLocatorWithPortAndProperties(final int port, final Properties properties)
       throws IOException {
     try {
-//      System.setProperty("p2p.joinTimeout", "5000"); // set a short join timeout. default
is 17000ms
       Locator.startLocatorAndDS(port, new File(""), properties);
     } catch (SystemConnectException e) {
       return Boolean.FALSE;
     } catch (GemFireConfigException e) {
       return Boolean.FALSE;
-    } finally {
-//      System.getProperties().remove("p2p.joinTimeout");
     }
     return Boolean.TRUE;
   }
@@ -635,12 +632,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   private Locator startLocatorInternal(final int port, final Properties properties)
       throws IOException {
     Locator locator;
-    try {
-//      System.setProperty("p2p.joinTimeout", "5000"); // set a short join timeout. default
is 17000ms
-      locator = Locator.startLocatorAndDS(port, new File(""), properties);
-    } finally {
-//      System.getProperties().remove("p2p.joinTimeout");
-    }
+    locator = Locator.startLocatorAndDS(port, new File(""), properties);
     return locator;
   }
 
@@ -1305,7 +1297,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     bgexecLogger.info(addExpected);
 
     boolean exceptionOccurred = true;
-//    String oldValue = (String) System.getProperties().put("p2p.joinTimeout", "15000");
     try {
       DistributedSystem.connect(props);
       exceptionOccurred = false;
@@ -1322,11 +1313,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       // if expected then add in a catch block for it above this catch
       org.apache.geode.test.dunit.Assert.fail("Failed with unexpected exception", ex);
     } finally {
-//      if (oldValue == null) {
-//        System.getProperties().remove("p2p.joinTimeout");
-//      } else {
-//        System.getProperties().put("p2p.joinTimeout", oldValue);
-//      }
       bgexecLogger.info(removeExpected);
     }
 
@@ -1360,7 +1346,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
 
       SerializableRunnable connect = new SerializableRunnable("Connect to " + locators) {
         public void run() {
-          // System.setProperty("p2p.joinTimeout", "5000");
           Properties props = new Properties();
           props.setProperty(MCAST_PORT, "0");
           props.setProperty(LOCATORS, locators);
@@ -1962,7 +1947,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     File logFile = new File("");
     try {
       System.setProperty(InternalLocator.LOCATORS_PREFERRED_AS_COORDINATORS, "true");
-//      System.setProperty("p2p.joinTimeout", "1000");
       Properties locProps = new Properties();
       locProps.put(MCAST_PORT, "0");
       locProps.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
@@ -1972,7 +1956,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       org.apache.geode.test.dunit.Assert.fail("While starting locator on port " + port, ex);
     } finally {
       System.getProperties().remove(InternalLocator.LOCATORS_PREFERRED_AS_COORDINATORS);
-//      System.getProperties().remove("p2p.joinTimeout");
     }
   }
 


Mime
View raw message