Repository: incubator-geode
Updated Branches:
  refs/heads/develop a5941da73 -> 1477c74de


GEODE-1931: Spotless


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

Branch: refs/heads/develop
Commit: 1477c74ded0663e664671f7c9b0a2936a020fbc7
Parents: a5941da
Author: Udo Kohlmeyer <ukohlme...@pivotal.io>
Authored: Thu Dec 1 14:11:35 2016 -0800
Committer: Udo Kohlmeyer <ukohlme...@pivotal.io>
Committed: Thu Dec 1 14:11:35 2016 -0800

----------------------------------------------------------------------
 .../geode/distributed/LocatorDUnitTest.java     | 55 ++++++++++----------
 1 file changed, 27 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1477c74d/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 350f183..b92ab25 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
@@ -97,6 +97,7 @@ import java.util.concurrent.TimeUnit;
 
 /**
  * Tests the ability of the {@link Locator} API to start and stop locators 
running in remote VMs.
+ * 
  * @since GemFire 4.0
  */
 @Category({DistributedTest.class, MembershipTest.class})
@@ -406,7 +407,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
   }
 
   private void startVerifyAndStopLocator(VM loc1, VM loc2, int port1, int 
port2,
-                                         Properties properties) {
+      Properties properties) {
     try {
       loc2.invoke("startLocator2", () -> 
startLocatorWithPortAndProperties(port2, properties));
       loc1.invoke("startLocator1", () -> 
startLocatorWithPortAndProperties(port1, properties));
@@ -632,7 +633,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
     try {
       DistributedSystem sys = locator.getDistributedSystem();
 
-      Object[] connectArgs = new Object[]{properties};
+      Object[] connectArgs = new Object[] {properties};
 
       assertTrue(MembershipManagerHelper.getLeadMember(sys) == null);
 
@@ -682,7 +683,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
   }
 
   private void assertLeadMember(final DistributedMember member, final 
DistributedSystem sys,
-                                long timeout) {
+      long timeout) {
     Awaitility.waitAtMost(timeout, TimeUnit.MILLISECONDS).pollInterval(200, 
TimeUnit.MILLISECONDS)
         .until(() -> {
           DistributedMember lead = MembershipManagerHelper.getLeadMember(sys);
@@ -755,7 +756,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
         }
       });
 
-      Object[] connectArgs = new Object[]{properties};
+      Object[] connectArgs = new Object[] {properties};
 
       SerializableRunnable crashLocator = new SerializableRunnable("Crash 
locator") {
         public void run() {
@@ -885,7 +886,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
         }
       });
 
-      Object[] connectArgs = new Object[]{properties};
+      Object[] connectArgs = new Object[] {properties};
 
       SerializableRunnable crashSystem = new SerializableRunnable("Crash 
system") {
         public void run() {
@@ -1031,7 +1032,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
         }
       });
 
-      Object[] connectArgs = new Object[]{properties};
+      Object[] connectArgs = new Object[] {properties};
 
       SerializableRunnable crashSystem = new SerializableRunnable("Crash 
system") {
         public void run() {
@@ -1167,7 +1168,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
       DistributedSystem sys = locator.getDistributedSystem();
       sys.getLogWriter().info(
           "<ExpectedException 
action=add>org.apache.geode.ForcedDisconnectException</ExpectedException>");
-      Object[] connectArgs = new Object[]{properties};
+      Object[] connectArgs = new Object[] {properties};
 
       assertTrue(MembershipManagerHelper.getLeadMember(sys) == null);
 
@@ -1616,9 +1617,9 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
     dsProps.setProperty(MCAST_PORT, "0");
 
     addDSProps(dsProps);
-    vm0.invoke(() -> startLocatorAsync(new Object[]{port1, dsProps}));
-    vm1.invoke(() -> startLocatorAsync(new Object[]{port2, dsProps}));
-    vm2.invoke(() -> startLocatorAsync(new Object[]{port3, dsProps}));
+    vm0.invoke(() -> startLocatorAsync(new Object[] {port1, dsProps}));
+    vm1.invoke(() -> startLocatorAsync(new Object[] {port2, dsProps}));
+    vm2.invoke(() -> startLocatorAsync(new Object[] {port3, dsProps}));
 
     try {
       try {
@@ -1670,11 +1671,11 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
         DistributedMember vm3ID = vm3.invoke(() -> GMSJoinLeaveTestHelper
             
.getInternalDistributedSystem().getDM().getDistributionManagerId());
         assertTrue("View is " + system.getDM().getMembershipManager().getView()
-                + " and vm3's ID is " + vm3ID,
+            + " and vm3's ID is " + vm3ID,
             vm3.invoke(() -> GMSJoinLeaveTestHelper.isViewCreator()));
 
-        vm1.invoke(() -> startLocatorAsync(new Object[]{port2, dsProps}));
-        vm2.invoke(() -> startLocatorAsync(new Object[]{port3, dsProps}));
+        vm1.invoke(() -> startLocatorAsync(new Object[] {port2, dsProps}));
+        vm2.invoke(() -> startLocatorAsync(new Object[] {port3, dsProps}));
 
         Awaitility.waitAtMost(30000, TimeUnit.MILLISECONDS).pollInterval(200, 
TimeUnit.MILLISECONDS)
             .until(() -> {
@@ -1856,13 +1857,13 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
 
       Awaitility.waitAtMost(WAIT2_MS, TimeUnit.MILLISECONDS)
           .pollInterval(200, TimeUnit.MILLISECONDS).until(() -> {
-        try {
-          return system.getDM().getViewMembers().size() == 5;
-        } catch (Exception e) {
-          org.apache.geode.test.dunit.Assert.fail("unexpected exception", e);
-        }
-        return false; // NOTREACHED
-      });
+            try {
+              return system.getDM().getViewMembers().size() == 5;
+            } catch (Exception e) {
+              org.apache.geode.test.dunit.Assert.fail("unexpected exception", 
e);
+            }
+            return false; // NOTREACHED
+          });
       system.disconnect();
 
       vm1.invoke(() -> disconnectDistributedSystem());
@@ -1952,6 +1953,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
 
   /**
    * Tests starting, stopping, and restarting a locator. See bug 32856.
+   * 
    * @since GemFire 4.1
    */
   @Test
@@ -2088,8 +2090,7 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
     }
 
     @Override
-    public void afterMembershipFailure(String reason, Throwable cause) {
-    }
+    public void afterMembershipFailure(String reason, Throwable cause) {}
 
     public void reset() {
       unboundedWait = false;
@@ -2102,19 +2103,17 @@ public class LocatorDUnitTest extends 
JUnit4DistributedTestCase {
     boolean quorumLostInvoked;
     List<String> suspectReasons = new ArrayList<>(50);
 
-    public void memberJoined(InternalDistributedMember id) {
-    }
+    public void memberJoined(InternalDistributedMember id) {}
 
-    public void memberDeparted(InternalDistributedMember id, boolean crashed) {
-    }
+    public void memberDeparted(InternalDistributedMember id, boolean crashed) 
{}
 
     public void memberSuspect(InternalDistributedMember id, 
InternalDistributedMember whoSuspected,
-                              String reason) {
+        String reason) {
       suspectReasons.add(reason);
     }
 
     public void quorumLost(Set<InternalDistributedMember> failures,
-                           List<InternalDistributedMember> remaining) {
+        List<InternalDistributedMember> remaining) {
       quorumLostInvoked = true;
       org.apache.geode.test.dunit.LogWriterUtils.getLogWriter()
           .info("quorumLost invoked in test code");

Reply via email to