geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [2/8] incubator-geode git commit: Add SecurityTest and FlakyTest. Convert CLI tests to JUnit 4.
Date Tue, 05 Apr 2016 17:38:17 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/categories/CategoryTest.java
----------------------------------------------------------------------
diff --git a/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/categories/CategoryTest.java b/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/categories/CategoryTest.java
new file mode 100644
index 0000000..be342c1
--- /dev/null
+++ b/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/categories/CategoryTest.java
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.test.junit.categories;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Categories;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.Result;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+import com.gemstone.gemfire.test.junit.rules.TestRunner;
+
+@Category(UnitTest.class)
+public class CategoryTest {
+
+  private static boolean executedClassOneMethodNone; // 1
+  private static boolean executedClassOneMethodTwo; // 2
+  private static boolean executedClassTwoMethodTwo; // 3
+  private static boolean executedClassNoneMethodOne; // 4
+  private static boolean executedClassNoneMethodTwo; // 5
+  private static boolean executedClassTwoMethodOne; // 6
+  private static boolean executedClassOneMethodOne; // 7
+  private static boolean executedClassOneAndTwoMethodNone; // 8
+  private static boolean executedClassNoneMethodOneAndTwo; // 9
+
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    executedClassOneMethodNone = false;
+    executedClassOneMethodTwo = false;
+    executedClassTwoMethodTwo = false;
+    executedClassNoneMethodOne = false;
+    executedClassNoneMethodTwo = false;
+    executedClassTwoMethodOne = false;
+    executedClassOneMethodOne = false;
+    executedClassOneAndTwoMethodNone = false;
+    executedClassNoneMethodOneAndTwo = false;
+  }
+
+  @AfterClass
+  public static void afterClass() throws Exception {
+  }
+
+  @Test
+  public void allTestsWithCategoryOneShouldBeExecuted() {
+    Result result = TestRunner.runTest(CategoryTestSuite.class);
+
+    assertThat(result.wasSuccessful()).isTrue();
+    assertThat(executedClassOneMethodNone).isTrue();
+    assertThat(executedClassOneMethodTwo).isTrue();
+    assertThat(executedClassTwoMethodTwo).isFalse();
+    assertThat(executedClassNoneMethodOne).isTrue();
+    assertThat(executedClassNoneMethodTwo).isFalse();
+    assertThat(executedClassTwoMethodOne).isTrue();
+    assertThat(executedClassOneMethodOne).isTrue();
+    assertThat(executedClassOneAndTwoMethodNone).isTrue();
+    assertThat(executedClassNoneMethodOneAndTwo).isTrue();
+  }
+
+  @Category(CategoryOne.class)
+  public static class ClassOneMethodNone { // 1
+    @Test
+    public void test() {
+      executedClassOneMethodNone = true;
+    }
+  }
+
+  @Category(CategoryOne.class)
+  public static class ClassOneMethodTwo { // 2
+    @Category(CategoryTwo.class)
+    @Test
+    public void test() {
+      executedClassOneMethodTwo = true;
+    }
+  }
+
+  @Category(CategoryTwo.class)
+  public static class ClassTwoMethodTwo { // 3
+    @Category(CategoryTwo.class)
+    @Test
+    public void test() {
+      executedClassTwoMethodTwo = true;
+    }
+  }
+
+  public static class ClassNoneMethodOne { // 4
+    @Category(CategoryOne.class)
+    @Test
+    public void test() {
+      executedClassNoneMethodOne = true;
+    }
+  }
+
+  public static class ClassNoneMethodTwo { // 5
+    @Category(CategoryTwo.class)
+    @Test
+    public void test() {
+      executedClassNoneMethodTwo = true;
+    }
+  }
+
+  @Category(CategoryTwo.class)
+  public static class ClassTwoMethodOne { // 6
+    @Category(CategoryOne.class)
+    @Test
+    public void test() {
+      executedClassTwoMethodOne = true;
+    }
+  }
+
+  @Category(CategoryOne.class)
+  public static class ClassOneMethodOne { // 7
+    @Category(CategoryOne.class)
+    @Test
+    public void test() {
+      executedClassOneMethodOne = true;
+    }
+  }
+
+  @Category({ CategoryOne.class, CategoryTwo.class })
+  public static class ClassOneAndTwoMethodNone { // 8
+    @Test
+    public void test() {
+      executedClassOneAndTwoMethodNone = true;
+    }
+  }
+
+  public static class ClassNoneMethodOneAndTwo { // 9
+    @Category({ CategoryOne.class, CategoryTwo.class })
+    @Test
+    public void test() {
+      executedClassNoneMethodOneAndTwo = true;
+    }
+  }
+
+  @RunWith(Categories.class)
+  @Categories.IncludeCategory(CategoryOne.class)
+  @Suite.SuiteClasses({
+          ClassOneMethodNone.class, // 1
+          ClassOneMethodTwo.class, // 2
+          ClassTwoMethodTwo.class, // 3
+          ClassNoneMethodOne.class, // 4
+          ClassNoneMethodTwo.class, // 5
+          ClassTwoMethodOne.class, // 6
+          ClassOneMethodOne.class, // 7
+          ClassOneAndTwoMethodNone.class, // 8
+          ClassNoneMethodOneAndTwo.class // 9
+  })
+  public static class CategoryTestSuite {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/categories/CategoryTwo.java
----------------------------------------------------------------------
diff --git a/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/categories/CategoryTwo.java b/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/categories/CategoryTwo.java
new file mode 100644
index 0000000..4a88339
--- /dev/null
+++ b/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/categories/CategoryTwo.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.test.junit.categories;
+
+public interface CategoryTwo {
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
index 9bfce05..719fd92 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
@@ -16,13 +16,14 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.wancommand;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
 import java.util.Set;
-
 import javax.management.remote.JMXConnectorServer;
 
 import com.gemstone.gemfire.cache.Cache;
@@ -44,13 +45,13 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase;
+import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
-public class WANCommandTestBase extends CliCommandTestBase{
+public class WANCommandTestBase extends CliCommandTestBase {
 
   static Cache cache;
   private JMXConnectorServer jmxConnectorServer;
@@ -67,10 +68,6 @@ public class WANCommandTestBase extends CliCommandTestBase{
   static VM vm6;
   static VM vm7;
 
-  public WANCommandTestBase(String name) {
-    super(name);
-  }
-
   @Override
   public final void postSetUp() throws Exception {
     final Host host = Host.getHost(0);
@@ -86,7 +83,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static Integer createFirstLocatorWithDSId(int dsId) {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
     Properties props = test.getDistributedSystemProperties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
@@ -99,7 +96,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static Integer createFirstRemoteLocator(int dsId, int remoteLocPort) {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
     Properties props = test.getDistributedSystemProperties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
@@ -112,7 +109,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static void createCache(Integer locPort){
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Properties props = test.getDistributedSystemProperties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
@@ -121,7 +118,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static void createCacheWithGroups(Integer locPort, String groups){
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Properties props = test.getDistributedSystemProperties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
@@ -214,7 +211,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static int createAndStartReceiver(int locPort) {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Properties props = test.getDistributedSystemProperties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
@@ -238,7 +235,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static int createReceiver(int locPort) {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Properties props = test.getDistributedSystemProperties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
@@ -256,7 +253,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static int createReceiverWithGroup(int locPort, String groups) {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Properties props =  test.getDistributedSystemProperties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
@@ -275,7 +272,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static void startReceiver() {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     try {
       Set<GatewayReceiver> receivers = cache.getGatewayReceivers();
       for (GatewayReceiver receiver : receivers) {
@@ -288,7 +285,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static void stopReceiver() {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Set<GatewayReceiver> receivers = cache.getGatewayReceivers();
     for (GatewayReceiver receiver : receivers) {
       receiver.stop();
@@ -296,7 +293,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static int createAndStartReceiverWithGroup(int locPort, String groups) {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Properties props = test.getDistributedSystemProperties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
@@ -444,7 +441,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
   }
 
   public static void verifyReceiverState(boolean isRunning) {
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Set<GatewayReceiver> receivers = cache.getGatewayReceivers();
     for (GatewayReceiver receiver : receivers) {
       assertEquals(isRunning, receiver.isRunning());
@@ -455,7 +452,7 @@ public class WANCommandTestBase extends CliCommandTestBase{
       int startPort, int endPort, String bindAddress, int maxTimeBetweenPings,
       int socketBufferSize, List<String> expectedGatewayTransportFilters) {
 
-    WANCommandTestBase test = new WANCommandTestBase(getTestMethodName());
+    WANCommandTestBase test = new WANCommandTestBase();
     Set<GatewayReceiver> receivers = cache.getGatewayReceivers();
     assertEquals("Number of receivers is incorrect", 1, receivers.size());
     for (GatewayReceiver receiver : receivers) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
index 1122059..d9a551b 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
@@ -16,12 +16,16 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.wancommand;
 
-import hydra.Log;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.wan.GatewayReceiver;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -31,22 +35,20 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 /**
  * DUnit tests for 'create gateway-receiver' command.
  */
-public class WanCommandCreateGatewayReceiverDUnitTest extends
-    WANCommandTestBase {
+@Category(DistributedTest.class)
+public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase {
 
   private static final long serialVersionUID = 1L;
   
-  public WanCommandCreateGatewayReceiverDUnitTest(String name) {
-    super(name);
-  }
-  
   /**
    * GatewayReceiver with all default attributes
    */
+  @Test
   public void testCreateGatewayReceiverWithDefault() {
 
     VM puneLocator = Host.getLocator();
@@ -68,7 +70,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -109,6 +111,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
   /**
    * GatewayReceiver with given attributes
    */
+  @Test
   public void testCreateGatewayReceiver() {
 
     VM puneLocator = Host.getLocator();
@@ -136,7 +139,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -165,6 +168,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
   /**
    * GatewayReceiver with given attributes and a single GatewayTransportFilter.
    */
+  @Test
   public void testCreateGatewayReceiverWithGatewayTransportFilter() {
 
     VM puneLocator = Host.getLocator();
@@ -193,7 +197,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -225,6 +229,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
   /**
    * GatewayReceiver with given attributes and multiple GatewayTransportFilters.
    */
+  @Test
   public void testCreateGatewayReceiverWithMultipleGatewayTransportFilters() {
 
     VM puneLocator = Host.getLocator();
@@ -254,7 +259,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -288,6 +293,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
    * GatewayReceiver with given attributes.
    * Error scenario where startPort is greater than endPort.
    */
+  @Test
   public void testCreateGatewayReceiver_Error() {
 
     VM puneLocator = Host.getLocator();
@@ -314,7 +320,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -336,6 +342,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
   /**
    * GatewayReceiver with given attributes on the given member.
    */
+  @Test
   public void testCreateGatewayReceiver_onMember() {
 
     VM puneLocator = Host.getLocator();
@@ -366,7 +373,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -391,6 +398,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
   /**
    * GatewayReceiver with given attributes on multiple members.
    */
+  @Test
   public void testCreateGatewayReceiver_onMultipleMembers() {
 
     VM puneLocator = Host.getLocator();
@@ -422,7 +430,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -449,6 +457,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
   /**
    * GatewayReceiver with given attributes on the given group.
    */
+  @Test
   public void testCreateGatewayReceiver_onGroup() {
 
     VM puneLocator = Host.getLocator();
@@ -477,7 +486,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -507,6 +516,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
    * GatewayReceiver with given attributes on the given group.
    * Only 2 of 3 members are part of the group.
    */
+  @Test
   public void testCreateGatewayReceiver_onGroup_Scenario2() {
 
     VM puneLocator = Host.getLocator();
@@ -535,7 +545,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -562,6 +572,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
   /**
    * GatewayReceiver with given attributes on multiple groups.
    */
+  @Test
   public void testCreateGatewayReceiver_onMultipleGroups() {
 
     VM puneLocator = Host.getLocator();
@@ -590,7 +601,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
index 2c99ad3..d5c4b75 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
@@ -16,14 +16,18 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.wancommand;
 
-import hydra.Log;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
 
-import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.wan.GatewaySender;
+import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.cache.wan.GatewaySenderException;
@@ -32,15 +36,13 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
+@Category(DistributedTest.class)
 public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
   
   private static final long serialVersionUID = 1L;
   
-  public WanCommandCreateGatewaySenderDUnitTest(String name) {
-    super(name);
-  }
-
   private CommandResult executeCommandWithIgnoredExceptions(String command) {
     final IgnoredException exln = IgnoredException.addIgnoredException("Could not connect");
     try {
@@ -55,6 +57,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
   /**
    * GatewaySender with all default attributes
    */
+  @Test
   public void testCreateGatewaySenderWithDefault() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -77,7 +80,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -103,6 +106,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
   /**
    * GatewaySender with given attribute values
    */
+  @Test
   public void testCreateGatewaySender() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -139,7 +143,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -174,6 +178,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
    * Error scenario where dispatcher threads is set to more than 1 and 
    * no order policy provided.
    */
+  @Test
   public void testCreateGatewaySender_Error() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -209,7 +214,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -226,10 +231,10 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
 
   }
 
-  
   /**
    * GatewaySender with given attribute values and event filters.
    */
+  @Test
   public void testCreateGatewaySenderWithGatewayEventFilters() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -268,7 +273,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -304,6 +309,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
   /**
    * GatewaySender with given attribute values and transport filters.
    */
+  @Test
   public void testCreateGatewaySenderWithGatewayTransportFilters() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -341,7 +347,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -376,6 +382,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
   /**
    * GatewaySender with given attribute values on given member.
    */
+  @Test
   public void testCreateGatewaySender_OnMember() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -415,7 +422,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -440,6 +447,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
   /**
    * GatewaySender with given attribute values on given group
    */
+  @Test
   public void testCreateGatewaySender_Group() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -477,7 +485,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -504,6 +512,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
    * GatewaySender with given attribute values on given group.
    * Only 2 of 3 members are part of the group.
    */
+  @Test
   public void testCreateGatewaySender_Group_Scenario2() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -541,7 +550,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -565,6 +574,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
   /**
    * Parallel GatewaySender with given attribute values
    */
+  @Test
   public void testCreateParallelGatewaySender() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -599,7 +609,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -633,6 +643,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
    * Parallel GatewaySender with given attribute values.
    * Provide dispatcherThreads as 2 which is not valid for Parallel sender.
    */
+  @Test
   public void testCreateParallelGatewaySender_Error() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -673,7 +684,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
       CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
       if (cmdResult != null) {
         String strCmdResult = commandResultToString(cmdResult);
-        Log.getLogWriter().info(
+        getLogWriter().info(
             "testCreateGatewaySender stringResult : " + strCmdResult + ">>>>");
         assertEquals(Result.Status.OK, cmdResult.getStatus());
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
index 6f26e3b..5edd3d2 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
@@ -16,11 +16,16 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.wancommand;
 
-import hydra.Log;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
 
 import java.util.List;
 import java.util.Properties;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.management.cli.Result;
@@ -29,20 +34,18 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
-public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
+@Category(DistributedTest.class)
+public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public WanCommandGatewayReceiverStartDUnitTest(String name) {
-    super(name);
-  }
-
   /**
    * Test wan commands for error in input 1> start gateway-sender command needs
    * only one of member or group.
    */
+  @Test
   public void testStartGatewayReceiver_ErrorConditions() {
 
     VM puneLocator = Host.getLocator();
@@ -66,7 +69,7 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewayReceiver_ErrorConditions stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.ERROR, cmdResult.getStatus());
       assertTrue(strCmdResult.contains(CliStrings.PROVIDE_EITHER_MEMBER_OR_GROUP_MESSAGE));
@@ -75,6 +78,7 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
     }
   }
 
+  @Test
   public void testStartGatewayReceiver() {
     
     VM puneLocator = Host.getLocator();
@@ -95,12 +99,12 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
     vm4.invoke(() -> WANCommandTestBase.verifyReceiverState( false ));
     vm5.invoke(() -> WANCommandTestBase.verifyReceiverState( false ));
     
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYRECEIVER;
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewayReceiver stringResult : " + strCmdResult + ">>>>");
       
       TabularResultData resultData = (TabularResultData) cmdResult.getResultData();
@@ -120,6 +124,7 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
    * test to validate that the start gateway sender starts the gateway sender on
    * a member
    */
+  @Test
   public void testStartGatewayReceiver_onMember() {
 
     VM puneLocator = Host.getLocator();
@@ -141,14 +146,14 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
     vm5.invoke(() -> WANCommandTestBase.verifyReceiverState( false ));
     
     final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> WANCommandTestBase.getMember());
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYRECEIVER + " --"
         + CliStrings.START_GATEWAYRECEIVER__MEMBER+ "=" + vm1Member.getId();
     
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewayReceiver_onMember stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       assertTrue(strCmdResult.contains("is started on member"));
@@ -165,6 +170,7 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
    * test to validate that the start gateway sender starts the gateway sender on
    * a group of members
    */
+  @Test
   public void testStartGatewayReceiver_Group() {
 
     VM puneLocator = Host.getLocator();
@@ -185,13 +191,13 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
     vm4.invoke(() -> WANCommandTestBase.verifyReceiverState( false ));
     vm5.invoke(() -> WANCommandTestBase.verifyReceiverState( false ));
     
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYRECEIVER + " --"
         + CliStrings.START_GATEWAYRECEIVER__GROUP + "=RG1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewayReceiver_Group stringResult : " + strCmdResult
               + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -215,6 +221,7 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
    * sender members belongs to multiple groups
    * 
    */
+  @Test
   public void testStartGatewayReceiver_MultipleGroup() {
     
     VM puneLocator = Host.getLocator();
@@ -239,13 +246,13 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase{
     vm6.invoke(() -> WANCommandTestBase.verifyReceiverState( false ));
     vm7.invoke(() -> WANCommandTestBase.verifyReceiverState( false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYRECEIVER + " --"
         + CliStrings.START_GATEWAYRECEIVER__GROUP + "=RG1,RG2";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewayReceiver_Group stringResult : " + strCmdResult
               + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
index 82ca3ba..d7bb6c3 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
@@ -16,11 +16,16 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.wancommand;
 
-import hydra.Log;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
 
 import java.util.List;
 import java.util.Properties;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.management.cli.Result;
@@ -29,20 +34,18 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
+@Category(DistributedTest.class)
 public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public WanCommandGatewayReceiverStopDUnitTest(String name) {
-    super(name);
-  }
-
   /**
    * Test wan commands for error in input 1> start gateway-sender command needs
    * only one of member or group.
    */
+  @Test
   public void testStopGatewayReceiver_ErrorConditions() {
 
     VM puneLocator = Host.getLocator();
@@ -66,7 +69,7 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStopGatewayReceiver_ErrorConditions stringResult : "
               + strCmdResult + ">>>>");
       assertEquals(Result.Status.ERROR, cmdResult.getStatus());
@@ -76,6 +79,7 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     }
   }
 
+  @Test
   public void testStopGatewayReceiver() {
 
     VM puneLocator = Host.getLocator();
@@ -96,12 +100,12 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     vm4.invoke(() -> WANCommandTestBase.verifyReceiverState( true ));
     vm5.invoke(() -> WANCommandTestBase.verifyReceiverState( true ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.STOP_GATEWAYRECEIVER;
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStopGatewayReceiver stringResult : " + strCmdResult + ">>>>");
 
       TabularResultData resultData = (TabularResultData) cmdResult
@@ -123,6 +127,7 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
    * test to validate that the start gateway sender starts the gateway sender on
    * a member
    */
+  @Test
   public void testStopGatewayReceiver_onMember() {
 
     VM puneLocator = Host.getLocator();
@@ -144,14 +149,14 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> WANCommandTestBase.verifyReceiverState( true ));
 
     final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> WANCommandTestBase.getMember());
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.STOP_GATEWAYRECEIVER + " --"
         + CliStrings.STOP_GATEWAYRECEIVER__MEMBER + "=" + vm1Member.getId();
 
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStopGatewayReceiver_onMember stringResult : " + strCmdResult
               + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -169,6 +174,7 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
    * test to validate that the start gateway sender starts the gateway sender on
    * a group of members
    */
+  @Test
   public void testStopGatewayReceiver_Group() {
 
     VM puneLocator = Host.getLocator();
@@ -189,13 +195,13 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     vm4.invoke(() -> WANCommandTestBase.verifyReceiverState( true ));
     vm5.invoke(() -> WANCommandTestBase.verifyReceiverState( true ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.STOP_GATEWAYRECEIVER + " --"
         + CliStrings.STOP_GATEWAYRECEIVER__GROUP + "=RG1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStopGatewayReceiver_Group stringResult : " + strCmdResult
               + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -220,6 +226,7 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
    * sender members belongs to multiple groups
    * 
    */
+  @Test
   public void testStopGatewayReceiver_MultipleGroup() {
 
     VM puneLocator = Host.getLocator();
@@ -244,13 +251,13 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     vm6.invoke(() -> WANCommandTestBase.verifyReceiverState( true ));
     vm7.invoke(() -> WANCommandTestBase.verifyReceiverState( true ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.STOP_GATEWAYRECEIVER + " --"
         + CliStrings.STOP_GATEWAYRECEIVER__GROUP + "=RG1,RG2";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStopGatewayReceiver_Group stringResult : " + strCmdResult
               + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
index a10a926..ecc6cec 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
@@ -16,11 +16,16 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.wancommand;
 
-import hydra.Log;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
 
 import java.util.List;
 import java.util.Properties;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.management.cli.Result;
@@ -28,20 +33,18 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
+@Category(DistributedTest.class)
 public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public WanCommandGatewaySenderStartDUnitTest(String name) {
-    super(name);
-  }
-
   /**
    * Test wan commands for error in input 1> start gateway-sender command needs
    * only one of member or group.
    */
+  @Test
   public void testStartGatewaySender_ErrorConditions() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -67,7 +70,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.ERROR, cmdResult.getStatus());
       assertTrue(strCmdResult.contains(CliStrings.PROVIDE_EITHER_MEMBER_OR_GROUP_MESSAGE));
@@ -86,6 +89,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     }
   }
 
+  @Test
   public void testStartGatewaySender() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -115,13 +119,13 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> WANCommandTestBase.verifySenderState(
         "ln", false, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --"
         + CliStrings.START_GATEWAYSENDER__ID + "=ln";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       
@@ -146,6 +150,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
    * test to validate that the start gateway sender starts the gateway sender on
    * a member
    */
+  @Test
   public void testStartGatewaySender_onMember() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -166,14 +171,14 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
         "ln", false, false ));
 
     final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> WANCommandTestBase.getMember());
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --"
         + CliStrings.START_GATEWAYSENDER__ID + "=ln --"
         + CliStrings.START_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId();
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       assertTrue(strCmdResult.contains("is started on member"));
@@ -189,6 +194,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
    * test to validate that the start gateway sender starts the gateway sender on
    * a group of members
    */
+  @Test
   public void testStartGatewaySender_Group() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -221,14 +227,14 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> WANCommandTestBase.verifySenderState(
         "ln", false, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --"
         + CliStrings.START_GATEWAYSENDER__ID + "=ln --"
         + CliStrings.START_GATEWAYSENDER__GROUP + "=SenderGroup1";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewaySender_Group stringResult : " + strCmdResult
               + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -253,8 +259,8 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
   /**
    * Test to validate the scenario gateway sender is started when one or more
    * sender members belongs to multiple groups
-   * 
    */
+  @Test
   public void testStartGatewaySender_MultipleGroup() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -299,14 +305,14 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     vm7.invoke(() -> WANCommandTestBase.verifySenderState(
         "ln", false, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --"
         + CliStrings.START_GATEWAYSENDER__ID + "=ln --"
         + CliStrings.START_GATEWAYSENDER__GROUP + "=SenderGroup1,SenderGroup2";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewaySender_Group stringResult : " + strCmdResult
               + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -334,8 +340,8 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
   /**
    * Test to validate the test scenario when one of the member ion group does
    * not have the sender.
-   * 
    */
+  @Test
   public void testStartGatewaySender_Group_MissingSenderFromGroup() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -364,7 +370,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> WANCommandTestBase.verifySenderState(
         "ln", false, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --"
         + CliStrings.START_GATEWAYSENDER__ID + "=ln --"
         + CliStrings.START_GATEWAYSENDER__GROUP + "=SenderGroup1";
@@ -373,7 +379,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
       String strCmdResult = commandResultToString(cmdResult);
       assertTrue(strCmdResult.contains("Error"));
       assertTrue(strCmdResult.contains("is not available"));
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStartGatewaySender_Group stringResult : " + strCmdResult
               + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
index f0e51bf..a90b984 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
@@ -16,11 +16,16 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.wancommand;
 
-import hydra.Log;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
 
 import java.util.List;
 import java.util.Properties;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.management.cli.Result;
@@ -28,16 +33,13 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
+@Category(DistributedTest.class)
 public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public WanCommandGatewaySenderStopDUnitTest(String name) {
-    super(name);
-  }
-
   private CommandResult executeCommandWithIgnoredExceptions(String command) {
     final IgnoredException exln = IgnoredException.addIgnoredException("Could not connect");
     CommandResult commandResult =  executeCommand(command);
@@ -45,7 +47,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     return commandResult;
   }
 
-
+  @Test
   public void testStopGatewaySender_ErrorConditions() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -71,7 +73,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStopGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.ERROR, cmdResult.getStatus());
       assertTrue(strCmdResult.contains(CliStrings.PROVIDE_EITHER_MEMBER_OR_GROUP_MESSAGE));
@@ -80,6 +82,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     }
   }
 
+  @Test
   public void testStopGatewaySender() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -113,13 +116,13 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> WANCommandTestBase.verifySenderState(
         "ln", true, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.STOP_GATEWAYSENDER + " --"
         + CliStrings.STOP_GATEWAYSENDER__ID + "=ln";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStopGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -145,6 +148,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
    * test to validate that the start gateway sender starts the gateway sender on
    * a member
    */
+  @Test
   public void testStopGatewaySender_onMember() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -167,14 +171,14 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
         "ln", true, false ));
 
     final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> WANCommandTestBase.getMember());
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.STOP_GATEWAYSENDER + " --"
         + CliStrings.STOP_GATEWAYSENDER__ID + "=ln --"
         + CliStrings.STOP_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId();
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testStopGatewaySender stringResult : " + strCmdResult + ">>>>");
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       assertTrue(strCmdResult.contains("is stopped on member"));
@@ -190,6 +194,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
    * test to validate that the start gateway sender starts the gateway sender on
    * a group of members
    */
+  @Test
   public void testStopGatewaySender_Group() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -226,14 +231,14 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> WANCommandTestBase.verifySenderState(
         "ln", true, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.STOP_GATEWAYSENDER + " --"
         + CliStrings.STOP_GATEWAYSENDER__ID + "=ln --"
         + CliStrings.STOP_GATEWAYSENDER__GROUP + "=SenderGroup1";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter()
+      getLogWriter()
           .info(
               "testStopGatewaySender_Group stringResult : " + strCmdResult
                   + ">>>>");
@@ -260,8 +265,8 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
   /**
    * Test to validate the scenario gateway sender is started when one or more
    * sender members belongs to multiple groups
-   * 
    */
+  @Test
   public void testStopGatewaySender_MultipleGroup() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -312,14 +317,14 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     vm7.invoke(() -> WANCommandTestBase.verifySenderState(
         "ln", true, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.STOP_GATEWAYSENDER + " --"
         + CliStrings.STOP_GATEWAYSENDER__ID + "=ln --"
         + CliStrings.STOP_GATEWAYSENDER__GROUP + "=SenderGroup1,SenderGroup2";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter()
+      getLogWriter()
           .info(
               "testStopGatewaySender_Group stringResult : " + strCmdResult
                   + ">>>>");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69fd61f0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
index 8880348..bcab986 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
@@ -16,11 +16,16 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.wancommand;
 
-import hydra.Log;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
 
 import java.util.List;
 import java.util.Properties;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
@@ -28,16 +33,14 @@ import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
+@Category(DistributedTest.class)
 public class WanCommandListDUnitTest extends WANCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public WanCommandListDUnitTest(String name) {
-    super(name);
-  }
-
+  @Test
   public void testListGatewayWithNoSenderReceiver() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -54,19 +57,19 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     vm4.invoke(() -> WANCommandTestBase.createCache( punePort ));
     vm5.invoke(() -> WANCommandTestBase.createCache( punePort ));
     
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.LIST_GATEWAY;
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info("testListGatewaySender : : " + strCmdResult);
+      getLogWriter().info("testListGatewaySender : : " + strCmdResult);
       assertEquals(Result.Status.ERROR, cmdResult.getStatus());
     } else {
       fail("testListGatewaySender failed as did not get CommandResult");
     }
   }
 
-  
+  @Test
   public void testListGatewaySender() {
 
     Integer punePort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -98,12 +101,12 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> WANCommandTestBase.createSender(
         "ln_Serial", 2, false, 100, 400, false, false, null, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.LIST_GATEWAY;
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info("testListGatewaySender" + strCmdResult);
+      getLogWriter().info("testListGatewaySender" + strCmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       
       TabularResultData tableResultData =
@@ -119,6 +122,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     }
   }
 
+  @Test
   public void testListGatewayReceiver() {
 
     Integer lnPort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -145,12 +149,12 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     vm6.invoke(() -> WANCommandTestBase.createSender(
         "ln_Parallel", 1, true, 100, 400, false, false, null, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.LIST_GATEWAY;
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info("testListGatewayReceiver" + strCmdResult);
+      getLogWriter().info("testListGatewayReceiver" + strCmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       
       TabularResultData tableResultData =
@@ -167,7 +171,8 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
       fail("testListGatewayReceiver failed as did not get CommandResult");
     }
   }
-  
+
+  @Test
   public void testListGatewaySenderGatewayReceiver() throws GfJsonException {
 
     Integer lnPort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -202,13 +207,13 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     vm7.invoke(() -> WANCommandTestBase.createSender(
         "ln_Parallel", 1, true, 100, 400, false, false, null, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.LIST_GATEWAY;
     CommandResult cmdResult = executeCommand(command);
     
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testListGatewaySenderGatewayReceiver : " + strCmdResult );
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       
@@ -228,7 +233,8 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
       fail("testListGatewaySenderGatewayReceiver failed as did not get CommandResult");
     }
   }
-  
+
+  @Test
   public void testListGatewaySenderGatewayReceiver_group() {
 
     Integer lnPort = (Integer) vm1.invoke(() -> WANCommandTestBase.createFirstLocatorWithDSId( 1 ));
@@ -266,12 +272,12 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     vm7.invoke(() -> WANCommandTestBase.createSender(
         "ln_Parallel", 1, true, 100, 400, false, false, null, false ));
 
-    Wait.pause(10000);
+    pause(10000);
     String command = CliStrings.LIST_GATEWAY + " --" + CliStrings.LIST_GATEWAY__GROUP + "=Serial_Sender";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testListGatewaySenderGatewayReceiver_group : " + strCmdResult );
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       
@@ -300,7 +306,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
       assertEquals(1, ports.size());
       
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testListGatewaySenderGatewayReceiver_group : " + strCmdResult );
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
@@ -311,7 +317,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testListGatewaySenderGatewayReceiver_group : " + strCmdResult );
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       
@@ -333,7 +339,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testListGatewaySenderGatewayReceiver_group : " + strCmdResult );
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       
@@ -354,7 +360,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      Log.getLogWriter().info(
+      getLogWriter().info(
           "testListGatewaySenderGatewayReceiver_group : " + strCmdResult );
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       


Mime
View raw message