geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject incubator-geode git commit: Cleanup tests
Date Mon, 02 May 2016 20:51:29 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1255 6cd078f7b -> 8b83be64c


Cleanup tests


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

Branch: refs/heads/feature/GEODE-1255
Commit: 8b83be64cdf45f58937c0830ea64ab067b8a6d19
Parents: 6cd078f
Author: Kirk Lund <klund@apache.org>
Authored: Mon May 2 13:51:16 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Mon May 2 13:51:16 2016 -0700

----------------------------------------------------------------------
 .../AbstractLauncherIntegrationTest.java        |  6 +-
 .../AbstractLauncherIntegrationTestCase.java    |  4 +-
 .../AbstractLauncherServiceStatusTest.java      |  8 +--
 .../distributed/AbstractLauncherTest.java       |  6 +-
 ...tractLocatorLauncherIntegrationTestCase.java |  9 ++-
 .../LauncherMemberMXBeanIntegrationTest.java    |  1 -
 .../gemfire/distributed/LocatorJUnitTest.java   | 67 ++++++++++----------
 .../LocatorLauncherIntegrationTest.java         |  4 +-
 .../LocatorLauncherLocalIntegrationTest.java    |  5 --
 .../LocatorLauncherRemoteIntegrationTest.java   |  4 +-
 ...rRemoteWithCustomLoggingIntegrationTest.java |  2 -
 .../distributed/LocatorLauncherTest.java        | 13 ++--
 .../MockServerLauncherCacheProvider.java        |  8 +--
 .../ServerLauncherIntegrationTest.java          |  5 +-
 .../ServerLauncherLocalIntegrationTest.java     | 14 ++--
 .../gemfire/distributed/ServerLauncherTest.java | 23 +++----
 16 files changed, 85 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
index 5af8faa..040d15f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
@@ -38,15 +38,15 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 @Category(IntegrationTest.class)
 public class AbstractLauncherIntegrationTest {
 
+  private File gemfirePropertiesFile;
+  private Properties expectedGemfireProperties;
+
   @Rule
   public final TemporaryFolder temporaryFolder = new TemporaryFolder();
   
   @Rule
   public final TestName testName = new TestName();
   
-  private File gemfirePropertiesFile;
-  private Properties expectedGemfireProperties;
-  
   @Before
   public void setUp() throws Exception {
     this.gemfirePropertiesFile = this.temporaryFolder.newFile("gemfire.properties");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
index 34c36da..043b5ae 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
@@ -16,7 +16,7 @@
  */
 package com.gemstone.gemfire.distributed;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -42,8 +42,8 @@ import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.process.PidUnavailableException;
-import com.gemstone.gemfire.internal.process.ProcessUtils;
 import com.gemstone.gemfire.internal.process.ProcessStreamReader.InputListener;
+import com.gemstone.gemfire.internal.process.ProcessUtils;
 import com.gemstone.gemfire.internal.util.IOUtils;
 import com.gemstone.gemfire.internal.util.StopWatch;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
index a0c381e..c741def 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
@@ -26,6 +26,10 @@ import java.net.UnknownHostException;
 import java.util.Arrays;
 import java.util.List;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.AbstractLauncherServiceStatusTest.TestLauncher.TestState;
 import com.gemstone.gemfire.internal.GemFireVersion;
 import com.gemstone.gemfire.internal.process.PidUnavailableException;
@@ -35,10 +39,6 @@ import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
 import com.gemstone.gemfire.management.internal.cli.json.GfJsonObject;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * Tests marshaling of ServiceStatus to and from JSON.
  * 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
index 02bfa00..cabb5ff 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
@@ -23,13 +23,13 @@ import java.net.URL;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * The AbstractLauncherTest class is a test suite of unit tests testing the contract and
functionality
  * of the AbstractLauncher class.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherIntegrationTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherIntegrationTestCase.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherIntegrationTestCase.java
index 5bdf610..5434a01 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherIntegrationTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherIntegrationTestCase.java
@@ -64,7 +64,14 @@ public abstract class AbstractLocatorLauncherIntegrationTestCase extends
Abstrac
       this.launcher = null;
     }
   }
-  
+
+  /**
+   * Override if needed
+   */
+  protected Status getExpectedStopStatusForNotRunning() {
+    return Status.NOT_RESPONDING;
+  }
+
   protected void waitForLocatorToStart(final LocatorLauncher launcher, int timeout, int interval,
boolean throwOnTimeout) throws Exception {
     assertEventuallyTrue("waiting for process to start: " + launcher.status(), new Callable<Boolean>()
{
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
index 4c0c878..1a2e2d7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
@@ -22,7 +22,6 @@ import java.lang.management.ManagementFactory;
 import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.Callable;
-
 import javax.management.MBeanServer;
 import javax.management.MBeanServerInvocationHandler;
 import javax.management.ObjectName;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
index 3c80d9a..7ee4694 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
@@ -16,8 +16,9 @@
  */
 package com.gemstone.gemfire.distributed;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
+import static com.gemstone.gemfire.internal.AvailablePort.*;
+import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.IOException;
@@ -26,48 +27,46 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Properties;
-import java.util.Vector;
 
 import org.junit.After;
-import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
 
 import com.gemstone.gemfire.SystemConnectException;
 import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionRequest;
 import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionResponse;
 import com.gemstone.gemfire.cache.client.internal.locator.QueueConnectionRequest;
 import com.gemstone.gemfire.cache.client.internal.locator.QueueConnectionResponse;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalLocator;
 import com.gemstone.gemfire.distributed.internal.ServerLocation;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroupsMessenger;
 import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
-import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.OSProcess;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.management.internal.JmxManagerAdvisor.JmxManagerProfile;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
 public class LocatorJUnitTest {
 
-  /**
-   *
-   */
   private static final int REQUEST_TIMEOUT = 5 * 1000;
+
   private Locator locator;
   private int port;
   private File tmpFile;
 
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
   @Before
   public void setUp() throws IOException {
     tmpFile = File.createTempFile("locator", ".log");
-    port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    port = getRandomAvailablePort(SOCKET);
     File locatorFile = new File("locator"+port+".dat");
     if (locatorFile.exists()) {
       locatorFile.delete();
@@ -79,19 +78,22 @@ public class LocatorJUnitTest {
     if(locator != null) {
       locator.stop();
     }
-    Assert.assertEquals(false, Locator.hasLocator());
+   assertEquals(false, Locator.hasLocator());
   }
 
+  /**
+   * TRAC #45804: if jmx-manager-start is true in a locator then gfsh connect will fail
+   */
   @Test
-  public void testBug45804() throws Exception {
+  public void testGfshConnectShouldSucceedIfJmxManagerStartIsTrueInLocator() throws Exception
{
     Properties dsprops = new Properties();
-    int jmxPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    int jmxPort = getRandomAvailablePort(SOCKET);
     dsprops.setProperty("mcast-port", "0");
     dsprops.setProperty("locators", "localhost[" + port + "]");
     dsprops.setProperty("jmx-manager-port", ""+jmxPort);
     dsprops.setProperty("jmx-manager-start", "true");
     dsprops.setProperty("jmx-manager-http-port", "0");
-    dsprops.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+    dsprops.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
     System.setProperty("gemfire.disableManagement", "false"); // not needed
     try {
       locator = Locator.startLocatorAndDS(port, new File("testJmxManager.log"), dsprops);
@@ -106,11 +108,11 @@ public class LocatorJUnitTest {
   @Test
   public void testBasicInfo() throws Exception {
     locator = Locator.startLocator(port, tmpFile);
-    Assert.assertTrue(locator.isPeerLocator());
-    Assert.assertFalse(locator.isServerLocator());
+   assertTrue(locator.isPeerLocator());
+   assertFalse(locator.isServerLocator());
     String[] info = InternalLocator.getLocatorInfo(InetAddress.getLocalHost(), port);
-    Assert.assertNotNull(info);
-    Assert.assertTrue(info.length > 1);
+   assertNotNull(info);
+   assertTrue(info.length > 1);
   }
 
   @Test
@@ -119,7 +121,7 @@ public class LocatorJUnitTest {
     dsprops.setProperty("mcast-port", "0");
     dsprops.setProperty("locators", "localhost[" + port + "]");
     dsprops.setProperty("jmx-manager-start", "false");
-    dsprops.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+    dsprops.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
 
     JGroupsMessenger.THROW_EXCEPTION_ON_START_HOOK = true;
     int threadCount = Thread.activeCount();
@@ -127,7 +129,7 @@ public class LocatorJUnitTest {
       locator = Locator.startLocatorAndDS(port, new File(""), dsprops);
       locator.stop();
       fail("expected an exception");
-    } catch (SystemConnectException e) {
+    } catch (SystemConnectException expected) {
       
       for (int i=0; i<10; i++) {
         if (threadCount < Thread.activeCount()) {
@@ -146,10 +148,10 @@ public class LocatorJUnitTest {
   public void testServerOnly() throws Exception {
     Properties props = new Properties();
     props.setProperty("mcast-port", "0");
-    props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+    props.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
     locator = Locator.startLocatorAndDS(port, tmpFile, null, props, false, true, null);
-    Assert.assertFalse(locator.isPeerLocator());
-    Assert.assertTrue(locator.isServerLocator());
+   assertFalse(locator.isPeerLocator());
+   assertTrue(locator.isServerLocator());
     Thread.sleep(1000);
     doServerLocation();
   }
@@ -158,12 +160,11 @@ public class LocatorJUnitTest {
   public void testBothPeerAndServer() throws Exception {
     Properties props = new Properties();
     props.setProperty("mcast-port", "0");
-//    props.setProperty(DistributionConfig.LOG_LEVEL_NAME , getGemFireLogLevel());
-    props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+    props.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
 
     locator = Locator.startLocatorAndDS(port, tmpFile, null, props);
-    Assert.assertTrue(locator.isPeerLocator());
-    Assert.assertTrue(locator.isServerLocator());
+   assertTrue(locator.isPeerLocator());
+   assertTrue(locator.isServerLocator());
     Thread.sleep(1000);
     doServerLocation();
     locator.stop();
@@ -172,9 +173,11 @@ public class LocatorJUnitTest {
   /**
    * Make sure two ServerLocation objects on different hosts but with the same port
    * are not equal
+   * <p/>
+   * TRAC #42040: LoadBalancing directs all traffic to a single cache server if all servers
are started on the same port
    */
   @Test
-  public void testBug42040() {
+  public void testServerLocationOnDifferentHostsShouldNotTestEqual() {
     ServerLocation sl1 = new ServerLocation("host1", 777);
     ServerLocation sl2 = new ServerLocation("host2", 777);
     if (sl1.equals(sl2)) {
@@ -186,14 +189,14 @@ public class LocatorJUnitTest {
     {
       ClientConnectionRequest request = new ClientConnectionRequest(Collections.EMPTY_SET,
"group1");
       ClientConnectionResponse response = (ClientConnectionResponse) TcpClient.requestToServer(InetAddress.getLocalHost(),
port, request, REQUEST_TIMEOUT);
-      Assert.assertEquals(null, response.getServer());
+     assertEquals(null, response.getServer());
     }
 
     {
       QueueConnectionRequest request = new QueueConnectionRequest(ClientProxyMembershipID.getNewProxyMembership(InternalDistributedSystem.getAnyInstance()),
3, Collections.EMPTY_SET, "group1",true);
       QueueConnectionResponse response = (QueueConnectionResponse) TcpClient.requestToServer(InetAddress.getLocalHost(),
port, request, REQUEST_TIMEOUT);
-      Assert.assertEquals(new ArrayList(), response.getServers());
-      Assert.assertFalse(response.isDurableQueueFound());
+     assertEquals(new ArrayList(), response.getServers());
+     assertFalse(response.isDurableQueueFound());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
index b463e84..5f442a2 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
@@ -16,9 +16,9 @@
  */
 package com.gemstone.gemfire.distributed;
 
-import static com.googlecode.catchexception.apis.BDDCatchException.caughtException;
-import static com.googlecode.catchexception.apis.BDDCatchException.when;
+import static com.googlecode.catchexception.apis.BDDCatchException.*;
 import static org.assertj.core.api.BDDAssertions.*;
+import static org.assertj.core.api.BDDAssertions.then;
 
 import java.io.File;
 import java.io.FileNotFoundException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index 7e8e667..252b5aa 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -34,7 +34,6 @@ import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
 import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.DistributionLocator;
@@ -64,10 +63,6 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
     disconnectFromDS();
   }
 
-  protected Status getExpectedStopStatusForNotRunning() {
-    return Status.NOT_RESPONDING;
-  }
-
   @Test
   public void testBuilderSetProperties() throws Throwable {
     this.launcher = new Builder()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
index c171cff..8550a35 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
@@ -16,8 +16,8 @@
  */
 package com.gemstone.gemfire.distributed;
 
-import static org.junit.Assert.*;
 import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -29,8 +29,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteWithCustomLoggingIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteWithCustomLoggingIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteWithCustomLoggingIntegrationTest.java
index b66350f..3677bb4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteWithCustomLoggingIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteWithCustomLoggingIntegrationTest.java
@@ -22,8 +22,6 @@ import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
index 39fdd4d..3799a64 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
@@ -21,20 +21,19 @@ import static org.junit.Assert.*;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 
-import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
-import com.gemstone.gemfire.distributed.LocatorLauncher.Command;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import joptsimple.OptionException;
-
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 
+import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
+import com.gemstone.gemfire.distributed.LocatorLauncher.Command;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * The LocatorLauncherTest class is a test suite of test cases for testing the contract and
functionality of
  * launching a GemFire Locator.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/MockServerLauncherCacheProvider.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/MockServerLauncherCacheProvider.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/MockServerLauncherCacheProvider.java
index c910832..aa7cd76 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/MockServerLauncherCacheProvider.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/MockServerLauncherCacheProvider.java
@@ -20,11 +20,10 @@ import java.util.Properties;
 
 import com.gemstone.gemfire.cache.Cache;
 
-public class MockServerLauncherCacheProvider
-    implements ServerLauncherCacheProvider {
+public class MockServerLauncherCacheProvider implements ServerLauncherCacheProvider {
+
   private static Cache cache;
 
-  
   public static Cache getCache() {
     return cache;
   }
@@ -34,8 +33,7 @@ public class MockServerLauncherCacheProvider
   }
 
   @Override
-  public Cache createCache(Properties gemfireProperties,
-      ServerLauncher serverLauncher) {
+  public Cache createCache(Properties gemfireProperties, ServerLauncher serverLauncher) {
     return cache;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
index 98c8ce6..34d613d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
@@ -16,10 +16,9 @@
  */
 package com.gemstone.gemfire.distributed;
 
-import static com.googlecode.catchexception.apis.BDDCatchException.caughtException;
-import static com.googlecode.catchexception.apis.BDDCatchException.when;
+import static com.googlecode.catchexception.apis.BDDCatchException.*;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.BDDAssertions.*;
+import static org.assertj.core.api.BDDAssertions.then;
 
 import java.io.File;
 import java.io.FileNotFoundException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index 03672b6..911bfab 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -16,8 +16,8 @@
  */
 package com.gemstone.gemfire.distributed;
 
-import static org.junit.Assert.*;
 import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.FileWriter;
@@ -26,6 +26,12 @@ import java.lang.management.ManagementFactory;
 import java.net.BindException;
 import java.net.InetAddress;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.Scope;
@@ -46,12 +52,6 @@ import com.gemstone.gemfire.internal.process.ProcessType;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * Integration tests for ServerLauncher as a local API in the local JVM.
  *

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b83be64/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
index c8e1882..25e9528 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
@@ -18,40 +18,35 @@ package com.gemstone.gemfire.distributed;
 
 import static org.junit.Assert.*;
 
-import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Collections;
-import java.util.Properties;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.distributed.ServerLauncher.Builder;
-import com.gemstone.gemfire.distributed.ServerLauncher.Command;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.support.DistributedSystemAdapter;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import edu.umd.cs.mtc.MultithreadedTestCase;
 import edu.umd.cs.mtc.TestFramework;
-
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.concurrent.Synchroniser;
 import org.jmock.lib.legacy.ClassImposteriser;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.distributed.ServerLauncher.Builder;
+import com.gemstone.gemfire.distributed.ServerLauncher.Command;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.support.DistributedSystemAdapter;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * The ServerLauncherTest class is a test suite of unit tests testing the contract, functionality
and invariants
  * of the ServerLauncher class.


Mime
View raw message