http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java index f01f6b2..ac5d8b7 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java @@ -21,7 +21,7 @@ import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.cache.client.internal.PoolImpl; /** @@ -52,7 +52,7 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase { try { CacheServerTestUtil.disableShufflingOfEndpoints(); - createClientCache(NetworkSupport.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 3); + createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 3); createEntriesK1andK2(); registerK1AndK2(); assertEquals(3, pool.getRedundantNames().size()); @@ -156,7 +156,7 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase { try { CacheServerTestUtil.disableShufflingOfEndpoints(); - createClientCache(NetworkSupport.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 0); + createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 0); createEntriesK1andK2(); registerK1AndK2(); assertEquals(0, pool.getRedundantNames().size()); @@ -208,7 +208,7 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase try { // long maxWaitTime = 60000; CacheServerTestUtil.disableShufflingOfEndpoints(); - createClientCache(NetworkSupport.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 1); + createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 1); createEntriesK1andK2(); registerK1AndK2(); assertEquals(1, pool.getRedundantNames().size());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java index dcf80c0..b110870 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java @@ -44,7 +44,7 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.IgnoredException; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -124,7 +124,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase PORT4 = ((Integer)server3.invoke(RedundancyLevelTestBase.class, "createServerCache")).intValue(); - String hostName = NetworkSupport.getServerHostName(Host.getHost(0)); + String hostName = NetworkUtils.getServerHostName(Host.getHost(0)); SERVER1 = hostName + PORT1; SERVER2 = hostName + PORT2; SERVER3 = hostName + PORT3; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java index ba8b456..b00c85b 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java @@ -35,7 +35,7 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -79,7 +79,7 @@ public class RegionCloseDUnitTest extends DistributedTestCase PORT1 = ((Integer)server1.invoke(RegionCloseDUnitTest.class, "createServerCache" )).intValue(); client1.invoke(RegionCloseDUnitTest.class, "createClientCache", new Object[] { - NetworkSupport.getServerHostName(host), new Integer(PORT1)}); + NetworkUtils.getServerHostName(host), new Integer(PORT1)}); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java index a2c7ac1..f705664 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java @@ -33,7 +33,7 @@ import com.gemstone.gemfire.internal.AvailablePort; import com.gemstone.gemfire.internal.cache.CacheServerImpl; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -207,11 +207,11 @@ public class RegisterInterestBeforeRegionCreationDUnitTest extends DistributedTe //client1 connected to server1 client1.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "createClient", - new Object[] { NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1) }); + new Object[] { NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1) }); //client2 connected to server2 client2.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "createClient", - new Object[] { NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT2) }); + new Object[] { NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT2) }); } public static Integer createServer(Boolean createRegion) throws Exception http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java index 5b726ca..5541a6a 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java @@ -26,8 +26,8 @@ import com.gemstone.gemfire.internal.AvailablePort; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.cache.client.*; @@ -89,15 +89,15 @@ public class RegisterInterestKeysDUnitTest extends DistributedTestCase host.getVM(i).invoke(getClass(), "createImpl", null); } - LogWriterSupport.getLogWriter().info("implementation class is " + impl.getClass()); + LogWriterUtils.getLogWriter().info("implementation class is " + impl.getClass()); PORT1 = ((Integer)server1.invoke(impl.getClass(), "createServerCache" )).intValue(); PORT2 = ((Integer)server2.invoke(impl.getClass(), "createServerCache" )).intValue(); client1.invoke(impl.getClass(), "createClientCache", new Object[] { - NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)}); + NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)}); client2.invoke(impl.getClass(), "createClientCache", new Object[] { - NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)}); + NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)}); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java index e11da5a..e0fc7ac 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java @@ -44,8 +44,8 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.IgnoredException; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -117,11 +117,11 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase createEntries(); setClientServerObserverForBeforeSendingClientAck(); server1.invoke(ReliableMessagingDUnitTest.class, "putOnServer"); - LogWriterSupport.getLogWriter().info("Entering waitForServerUpdate"); + LogWriterUtils.getLogWriter().info("Entering waitForServerUpdate"); waitForServerUpdate(); - LogWriterSupport.getLogWriter().info("Entering waitForCallback"); + LogWriterUtils.getLogWriter().info("Entering waitForCallback"); waitForCallback(); - LogWriterSupport.getLogWriter().info("Entering waitForClientAck"); + LogWriterUtils.getLogWriter().info("Entering waitForClientAck"); waitForClientAck(); server2.invoke(ReliableMessagingDUnitTest.class, "checkTidAndSeq"); } @@ -151,7 +151,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase (System.currentTimeMillis() - start) < maxWaitTime); sleep(1000); } - LogWriterSupport.getLogWriter().info("seo = " + seo); + LogWriterUtils.getLogWriter().info("seo = " + seo); assertTrue("Creation time " + creationTime + " supposed to be same as seo " + seo.getCreationTime(), creationTime == seo.getCreationTime()); } @@ -180,7 +180,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase .getValue(); assertFalse(seo.getAckSend()); creationTime = seo.getCreationTime(); - LogWriterSupport.getLogWriter().info("seo is " + seo.toString()); + LogWriterUtils.getLogWriter().info("seo is " + seo.toString()); assertTrue("Creation time not set", creationTime != 0); Object args[] = @@ -299,13 +299,13 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase origObserver = ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() { public void beforeSendingClientAck() { - LogWriterSupport.getLogWriter().info("beforeSendingClientAck invoked"); + LogWriterUtils.getLogWriter().info("beforeSendingClientAck invoked"); setCreationTimeTidAndSeq(); server1.invoke(ReliableMessagingDUnitTest.class, "stopServer"); checkServerCount(1,1); server2.invoke(ReliableMessagingDUnitTest.class, "checkEmptyDispatchedMsgs"); PoolImpl.BEFORE_SENDING_CLIENT_ACK_CALLBACK_FLAG = false; - LogWriterSupport.getLogWriter().info("end of beforeSendingClientAck"); + LogWriterUtils.getLogWriter().info("end of beforeSendingClientAck"); } }); } @@ -376,7 +376,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase server.setPort(port); server.setNotifyBySubscription(true); server.start(); - LogWriterSupport.getLogWriter().info("Server started at PORT = " + port); + LogWriterUtils.getLogWriter().info("Server started at PORT = " + port); return new Integer(server.getPort()); } @@ -388,7 +388,7 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); props.setProperty(DistributionConfig.LOCATORS_NAME, ""); cache = test.createCache(props); - String host = NetworkSupport.getServerHostName(Host.getHost(0)); + String host = NetworkUtils.getServerHostName(Host.getHost(0)); PoolImpl p = (PoolImpl)PoolManager.createFactory() .addServer(host, PORT1) .addServer(host, PORT2) http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java index 2538d70..6078f58 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java @@ -39,7 +39,7 @@ import com.gemstone.gemfire.internal.cache.FilterProfile; import com.gemstone.gemfire.internal.cache.GemFireCacheImpl; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; -import com.gemstone.gemfire.test.dunit.DistributedTestSupport; +import com.gemstone.gemfire.test.dunit.DistributedTestUtils; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; @@ -313,7 +313,7 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase { DistributedSystem ds = new UnregisterInterestDUnitTest("UnregisterInterestDUnitTest").getSystem(); ds.disconnect(); Properties props = new Properties(); - props.setProperty("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]"); + props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]"); CacheFactory cf = new CacheFactory(props); cache = cf.create(); RegionFactory rf = ((GemFireCacheImpl)cache).createRegionFactory(RegionShortcut.REPLICATE); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java index a3d0878..f9c2160 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java @@ -48,7 +48,7 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.IgnoredException; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -128,9 +128,9 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase PORT2 = ((Integer)server2.invoke(getClass(), "createServerCache" )).intValue(); client1.invoke(getClass(), "createClientCache", new Object[] { - NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)}); + NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)}); client2.invoke(getClass(), "createClientCache", new Object[] { - NetworkSupport.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)}); + NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)}); IgnoredException.addIgnoredException("java.net.SocketException"); IgnoredException.addIgnoredException("Unexpected IOException"); @@ -257,7 +257,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase // Client1 should not receive updated value while client2 should receive client1.invoke(impl.getClass(), "acquireConnectionsAndPutonK1andK2", - new Object[] { NetworkSupport.getServerHostName(client1.getHost())}); + new Object[] { NetworkUtils.getServerHostName(client1.getHost())}); //pause(5000); //Check if both the puts ( on key1 & key2 ) have reached the servers server1.invoke(impl.getClass(), "verifyUpdates"); @@ -383,7 +383,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase // Client1 should not receive updated value while client2 should receive client1.invoke(impl.getClass(), "acquireConnectionsAndPutonK1andK2", - new Object[] { NetworkSupport.getServerHostName(client1.getHost())}); + new Object[] { NetworkUtils.getServerHostName(client1.getHost())}); Wait.pause(5000); //Check if both the puts ( on key1 & key2 ) have reached the servers server1.invoke(impl.getClass(), "verifyUpdates"); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java index 9fbdfdb..d402c4a 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java @@ -36,7 +36,7 @@ import com.gemstone.gemfire.internal.cache.LocalRegion; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.cache.client.*; @@ -87,7 +87,7 @@ public class VerifyUpdatesFromNonInterestEndPointDUnitTest extends DistributedTe PORT2 = ((Integer)vm1.invoke(VerifyUpdatesFromNonInterestEndPointDUnitTest.class, "createServerCache" )).intValue(); vm2.invoke(VerifyUpdatesFromNonInterestEndPointDUnitTest.class, "createClientCache", - new Object[] { NetworkSupport.getServerHostName(vm0.getHost()), new Integer(PORT1),new Integer(PORT2)}); + new Object[] { NetworkUtils.getServerHostName(vm0.getHost()), new Integer(PORT1),new Integer(PORT2)}); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java index c992012..df85998 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java @@ -35,7 +35,7 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream; import com.gemstone.gemfire.internal.InternalDataSerializer; import com.gemstone.gemfire.internal.Version; import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.junit.categories.UnitTest; @Category(UnitTest.class) @@ -56,7 +56,7 @@ public class RegionVersionVectorJUnitTest extends TestCase { public void testRegionVersionVectors() throws Exception { // this is just a quick set of unit tests for basic RVV functionality - final String local = NetworkSupport.getIPLiteral(); + final String local = NetworkUtils.getIPLiteral(); InternalDistributedMember server1 = new InternalDistributedMember(local, 101); InternalDistributedMember server2 = new InternalDistributedMember(local, 102); InternalDistributedMember server3 = new InternalDistributedMember(local, 103); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java index 2b5f2be..17c4558 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java @@ -79,7 +79,7 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.IgnoredException; import com.gemstone.gemfire.test.dunit.Invoke; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; @@ -449,7 +449,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase { else { persistentDirectory = new File(diskStoreName); } - LogWriterSupport.getLogWriter().info("The ds is : " + persistentDirectory.getName()); + LogWriterUtils.getLogWriter().info("The ds is : " + persistentDirectory.getName()); persistentDirectory.mkdir(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); File[] dirs1 = new File[] { persistentDirectory }; @@ -1022,12 +1022,12 @@ public class AsyncEventQueueTestBase extends DistributedTestCase { try { RebalanceResults simulateResults = null; if (!heapEviction) { - LogWriterSupport.getLogWriter().info("Calling rebalance simulate"); + LogWriterUtils.getLogWriter().info("Calling rebalance simulate"); RebalanceOperation simulateOp = factory.simulate(); simulateResults = simulateOp.getResults(); } - LogWriterSupport.getLogWriter().info("Starting rebalancing"); + LogWriterUtils.getLogWriter().info("Starting rebalancing"); RebalanceOperation rebalanceOp = factory.start(); RebalanceResults rebalanceResults = rebalanceOp.getResults(); @@ -1406,7 +1406,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase { for (int bucketId : bucketIds) { List<GatewaySenderEventImpl> eventsForBucket = bucketToEventsMap .get(bucketId); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Events for bucket: " + bucketId + " is " + eventsForBucket); assertNotNull(eventsForBucket); for (int i = 0; i < batchSize; i++) { @@ -1428,7 +1428,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase { final Map eventsMap = ((MyAsyncEventListener)theListener).getEventsMap(); assertNotNull(eventsMap); - LogWriterSupport.getLogWriter().info("The events map size is " + eventsMap.size()); + LogWriterUtils.getLogWriter().info("The events map size is " + eventsMap.size()); return eventsMap.size(); } @@ -1488,7 +1488,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase { } } if (sender.isPrimary()) { - LogWriterSupport.getLogWriter().info("Gateway sender is killed by a test"); + LogWriterUtils.getLogWriter().info("Gateway sender is killed by a test"); cache.getDistributedSystem().disconnect(); return Boolean.TRUE; } @@ -1511,7 +1511,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase { } } if (queue.isPrimary()) { - LogWriterSupport.getLogWriter().info("AsyncEventQueue is killed by a test"); + LogWriterUtils.getLogWriter().info("AsyncEventQueue is killed by a test"); cache.getDistributedSystem().disconnect(); return Boolean.TRUE; } @@ -1519,10 +1519,10 @@ public class AsyncEventQueueTestBase extends DistributedTestCase { } public static void killSender() { - LogWriterSupport.getLogWriter().info("Gateway sender is going to be killed by a test"); + LogWriterUtils.getLogWriter().info("Gateway sender is going to be killed by a test"); cache.close(); cache.getDistributedSystem().disconnect(); - LogWriterSupport.getLogWriter().info("Gateway sender is killed by a test"); + LogWriterUtils.getLogWriter().info("Gateway sender is killed by a test"); } public static class MyLocatorCallback extends LocatorDiscoveryCallbackAdapter { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java index c15facb..02ed4ef 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java @@ -32,7 +32,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; import com.gemstone.gemfire.internal.AvailablePortHelper; import com.gemstone.gemfire.internal.cache.wan.AsyncEventQueueTestBase; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.Wait; public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { @@ -645,8 +645,8 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { int vm5size = (Integer)vm5.invoke(AsyncEventQueueTestBase.class, "getAsyncEventListenerMapSize", new Object[] { "ln" }); - LogWriterSupport.getLogWriter().info("vm4 size is: " + vm4size); - LogWriterSupport.getLogWriter().info("vm5 size is: " + vm5size); + LogWriterUtils.getLogWriter().info("vm4 size is: " + vm4size); + LogWriterUtils.getLogWriter().info("vm5 size is: " + vm5size); // verify that there is no event loss assertTrue( "Total number of entries in events map on vm4 and vm5 should be at least 2000", @@ -1662,14 +1662,14 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { vm4.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort }); vm5.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort }); - LogWriterSupport.getLogWriter().info("Created the cache"); + LogWriterUtils.getLogWriter().info("Created the cache"); vm4.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2", new Object[] { "ln", true, 100, 5, false, null }); vm5.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2", new Object[] { "ln", true, 100, 5, false, null }); - LogWriterSupport.getLogWriter().info("Created the AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Created the AsyncEventQueue"); vm4.invoke(AsyncEventQueueTestBase.class, "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] { @@ -1678,7 +1678,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] { getTestMethodName() + "_PR", "ln", isOffHeap() }); - LogWriterSupport.getLogWriter().info("Created PR with AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Created PR with AsyncEventQueue"); vm4 .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue", @@ -1689,18 +1689,18 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { Wait.pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue // is paused - LogWriterSupport.getLogWriter().info("Paused the AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Paused the AsyncEventQueue"); vm4.invoke(AsyncEventQueueTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR", 80 }); - LogWriterSupport.getLogWriter().info("Done puts"); + LogWriterUtils.getLogWriter().info("Done puts"); Set<Integer> primaryBucketsVm5 = (Set<Integer>)vm5.invoke( AsyncEventQueueTestBase.class, "getAllPrimaryBucketsOnTheNode", new Object[] { getTestMethodName() + "_PR" }); - LogWriterSupport.getLogWriter().info("Primary buckets on vm5: " + primaryBucketsVm5); + LogWriterUtils.getLogWriter().info("Primary buckets on vm5: " + primaryBucketsVm5); // ---------------------------- Kill vm5 -------------------------- vm5.invoke(AsyncEventQueueTestBase.class, "killSender", new Object[] {}); @@ -1728,14 +1728,14 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { vm4.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort }); vm5.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort }); - LogWriterSupport.getLogWriter().info("Created the cache"); + LogWriterUtils.getLogWriter().info("Created the cache"); vm4.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2", new Object[] { "ln", true, 100, 5, false, null }); vm5.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2", new Object[] { "ln", true, 100, 5, false, null }); - LogWriterSupport.getLogWriter().info("Created the AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Created the AsyncEventQueue"); vm4.invoke(AsyncEventQueueTestBase.class, "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] { @@ -1744,7 +1744,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] { getTestMethodName() + "_PR", "ln", isOffHeap() }); - LogWriterSupport.getLogWriter().info("Created PR with AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Created PR with AsyncEventQueue"); vm4 .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue", @@ -1755,18 +1755,18 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { Wait.pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue // is paused - LogWriterSupport.getLogWriter().info("Paused the AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Paused the AsyncEventQueue"); vm4.invoke(AsyncEventQueueTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR", 80 }); - LogWriterSupport.getLogWriter().info("Done puts"); + LogWriterUtils.getLogWriter().info("Done puts"); Set<Integer> primaryBucketsVm5 = (Set<Integer>)vm5.invoke( AsyncEventQueueTestBase.class, "getAllPrimaryBucketsOnTheNode", new Object[] { getTestMethodName() + "_PR" }); - LogWriterSupport.getLogWriter().info("Primary buckets on vm5: " + primaryBucketsVm5); + LogWriterUtils.getLogWriter().info("Primary buckets on vm5: " + primaryBucketsVm5); // ---------------------------- Kill vm5 -------------------------- vm5.invoke(AsyncEventQueueTestBase.class, "killSender", new Object[] {}); // ---------------------------------------------------------------- @@ -1812,14 +1812,14 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { vm4.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort }); vm5.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort }); - LogWriterSupport.getLogWriter().info("Created the cache"); + LogWriterUtils.getLogWriter().info("Created the cache"); vm4.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2", new Object[] { "ln", true, 100, 5, false, null }); vm5.invoke(AsyncEventQueueTestBase.class, "createAsyncEventQueueWithListener2", new Object[] { "ln", true, 100, 5, false, null }); - LogWriterSupport.getLogWriter().info("Created the AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Created the AsyncEventQueue"); vm4.invoke(AsyncEventQueueTestBase.class, "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] { @@ -1828,7 +1828,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { "createPRWithRedundantCopyWithAsyncEventQueue", new Object[] { getTestMethodName() + "_PR", "ln", isOffHeap() }); - LogWriterSupport.getLogWriter().info("Created PR with AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Created PR with AsyncEventQueue"); vm4 .invoke(AsyncEventQueueTestBase.class, "pauseAsyncEventQueue", @@ -1839,12 +1839,12 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { Wait.pause(1000);// pause for the batchTimeInterval to make sure the AsyncQueue // is paused - LogWriterSupport.getLogWriter().info("Paused the AsyncEventQueue"); + LogWriterUtils.getLogWriter().info("Paused the AsyncEventQueue"); vm4.invoke(AsyncEventQueueTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR", 80 }); - LogWriterSupport.getLogWriter().info("Done puts"); + LogWriterUtils.getLogWriter().info("Done puts"); // ---------------------------- start vm6 -------------------------- vm6.invoke(AsyncEventQueueTestBase.class, "createCache", new Object[] { lnPort }); @@ -1860,7 +1860,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase { Set<Integer> primaryBucketsVm6 = (Set<Integer>)vm6.invoke( AsyncEventQueueTestBase.class, "getAllPrimaryBucketsOnTheNode", new Object[] { getTestMethodName() + "_PR" }); - LogWriterSupport.getLogWriter().info("Primary buckets on vm6: " + primaryBucketsVm6); + LogWriterUtils.getLogWriter().info("Primary buckets on vm6: " + primaryBucketsVm6); vm4.invoke(AsyncEventQueueTestBase.class, "resumeAsyncEventQueue", new Object[] { "ln" }); vm5.invoke(AsyncEventQueueTestBase.class, "resumeAsyncEventQueue", http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java index d6e130c..653a376 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java @@ -27,7 +27,7 @@ import com.gemstone.gemfire.compression.Compressor; import com.gemstone.gemfire.compression.SnappyCompressor; import com.gemstone.gemfire.internal.cache.LocalRegion; import com.gemstone.gemfire.test.dunit.IgnoredException; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; @@ -134,15 +134,15 @@ public class CompressionCacheConfigDUnitTest extends CacheTestCase { disconnectFromDS(); Properties props = new Properties(); props.setProperty("cache-xml-file",cacheXml); - LogWriterSupport.getLogWriter().info("<ExpectedException action=add>ClassNotFoundException</ExpectedException>"); + LogWriterUtils.getLogWriter().info("<ExpectedException action=add>ClassNotFoundException</ExpectedException>"); getSystem(props); assertNotNull(getCache()); return Boolean.TRUE; } catch(Exception e) { - LogWriterSupport.getLogWriter().error("Could not create the cache", e); + LogWriterUtils.getLogWriter().error("Could not create the cache", e); return Boolean.FALSE; } finally { - LogWriterSupport.getLogWriter().info("<ExpectedException action=remove>ClassNotFoundException</ExpectedException>"); + LogWriterUtils.getLogWriter().info("<ExpectedException action=remove>ClassNotFoundException</ExpectedException>"); } } }); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java index 7442ce0..cd71a2c 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java @@ -27,9 +27,9 @@ import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache30.CacheTestCase; import com.gemstone.gemfire.compression.Compressor; import com.gemstone.gemfire.compression.SnappyCompressor; -import com.gemstone.gemfire.test.dunit.DistributedTestSupport; +import com.gemstone.gemfire.test.dunit.DistributedTestUtils; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -369,7 +369,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase { try { assertNotNull(createServerRegion(name,dataPolicy,compressor)); } catch(Exception e) { - LogWriterSupport.getLogWriter().error("Could not create the compressed region", e); + LogWriterUtils.getLogWriter().error("Could not create the compressed region", e); return Boolean.FALSE; } @@ -392,7 +392,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase { try { assertNotNull(createRegion(name,dataPolicy,compressor)); } catch(Exception e) { - LogWriterSupport.getLogWriter().error("Could not create the compressed region", e); + LogWriterUtils.getLogWriter().error("Could not create the compressed region", e); return Boolean.FALSE; } @@ -415,7 +415,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase { try { assertNotNull(createRegion(name,dataPolicy,compressor,diskStoreName)); } catch(Exception e) { - LogWriterSupport.getLogWriter().error("Could not create the compressed region", e); + LogWriterUtils.getLogWriter().error("Could not create the compressed region", e); return Boolean.FALSE; } @@ -439,7 +439,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase { try { assertNotNull(createClientRegion(name,compressor,shortcut)); } catch(Exception e) { - LogWriterSupport.getLogWriter().error("Could not create the compressed region", e); + LogWriterUtils.getLogWriter().error("Could not create the compressed region", e); return Boolean.FALSE; } @@ -521,7 +521,7 @@ public class CompressionRegionConfigDUnitTest extends CacheTestCase { } // Running in hydra else { - return DistributedTestSupport.getDUnitLocatorPort(); + return DistributedTestUtils.getDUnitLocatorPort(); } } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java index 7349431..3f2a0bc 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java @@ -38,7 +38,7 @@ import com.gemstone.gemfire.internal.OSProcess; import com.gemstone.gemfire.internal.jta.CacheUtils; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.util.test.TestUtil; @@ -61,7 +61,7 @@ public class ExceptionsDUnitTest extends DistributedTestCase { // // sb.append(lineSep); } - LogWriterSupport.getLogWriter().fine("***********\n " + sb); + LogWriterUtils.getLogWriter().fine("***********\n " + sb); return sb.toString(); } @@ -111,10 +111,10 @@ public class ExceptionsDUnitTest extends DistributedTestCase { * value=\"83f0069202c571faf1ae6c42b4ad46030e4e31c17409e19a\"/>"; */ int n1 = str.indexOf(search); - LogWriterSupport.getLogWriter().fine("Start Index = " + n1); + LogWriterUtils.getLogWriter().fine("Start Index = " + n1); int n2 = str.indexOf(last_search, n1); StringBuffer sbuff = new StringBuffer(str); - LogWriterSupport.getLogWriter().fine("END Index = " + n2); + LogWriterUtils.getLogWriter().fine("END Index = " + n2); String modified_str = sbuff.replace(n1, n2, new_str).toString(); return modified_str; } @@ -174,7 +174,7 @@ public class ExceptionsDUnitTest extends DistributedTestCase { if (ds != null) ds.disconnect(); } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Error in disconnecting from Distributed System"); + LogWriterUtils.getLogWriter().fine("Error in disconnecting from Distributed System"); } } @@ -235,7 +235,7 @@ public class ExceptionsDUnitTest extends DistributedTestCase { + "occur"); } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Exception caught in runTest1 due to : " + e); + LogWriterUtils.getLogWriter().fine("Exception caught in runTest1 due to : " + e); fail("failed in runTest1 due to " + e); } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java index f356a79..02d2531 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java @@ -41,8 +41,8 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.util.test.TestUtil; @@ -65,7 +65,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { // // sb.append(lineSep); } - LogWriterSupport.getLogWriter().info("***********\n " + sb); + LogWriterUtils.getLogWriter().info("***********\n " + sb); return sb.toString(); } @@ -115,22 +115,22 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { * value=\"83f0069202c571faf1ae6c42b4ad46030e4e31c17409e19a\"/>"; */ int n1 = str.indexOf(search); - LogWriterSupport.getLogWriter().info("Start Index = " + n1); + LogWriterUtils.getLogWriter().info("Start Index = " + n1); int n2 = str.indexOf(last_search, n1); StringBuffer sbuff = new StringBuffer(str); - LogWriterSupport.getLogWriter().info("END Index = " + n2); + LogWriterUtils.getLogWriter().info("END Index = " + n2); String modified_str = sbuff.replace(n1, n2, new_str).toString(); return modified_str; } public static String init(String className) throws Exception { - LogWriterSupport.getLogWriter().fine("PATH11 "); + LogWriterUtils.getLogWriter().fine("PATH11 "); Properties props = new Properties(); String path = System.getProperty("CACHEXMLFILE"); - LogWriterSupport.getLogWriter().fine("PATH2 " + path); + LogWriterUtils.getLogWriter().fine("PATH2 " + path); int pid = OSProcess.getId(); path = File.createTempFile("dunit-cachejta_", ".xml").getAbsolutePath(); - LogWriterSupport.getLogWriter().fine("PATH " + path); + LogWriterUtils.getLogWriter().fine("PATH " + path); /** * Return file as string and then modify the string accordingly ** */ String file_as_str = readFile(TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml")); file_as_str = file_as_str.replaceAll("newDB", "newDB_" + pid); @@ -172,7 +172,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { String sql = "create table " + tableName + " (id integer NOT NULL, name varchar(50), CONSTRAINT "+tableName+"_key PRIMARY KEY(id))"; - LogWriterSupport.getLogWriter().info(sql); + LogWriterUtils.getLogWriter().info(sql); Connection conn = ds.getConnection(); Statement sm = conn.createStatement(); sm.execute(sql); @@ -181,7 +181,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { for (int i = 1; i <= 10; i++) { sql = "insert into " + tableName + " values (" + i + ",'name" + i + "')"; sm.addBatch(sql); - LogWriterSupport.getLogWriter().info(sql); + LogWriterUtils.getLogWriter().info(sql); } sm.executeBatch(); conn.close(); @@ -193,18 +193,18 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { Context ctx = cache.getJNDIContext(); DataSource ds = (DataSource) ctx.lookup("java:/SimpleDataSource"); Connection conn = ds.getConnection(); - LogWriterSupport.getLogWriter().info(" trying to drop table: " + tableName); + LogWriterUtils.getLogWriter().info(" trying to drop table: " + tableName); String sql = "drop table " + tableName; Statement sm = conn.createStatement(); sm.execute(sql); conn.close(); } catch (NamingException ne) { - LogWriterSupport.getLogWriter().info("destroy table naming exception: " + ne); + LogWriterUtils.getLogWriter().info("destroy table naming exception: " + ne); throw ne; } catch (SQLException se) { - LogWriterSupport.getLogWriter().info("destroy table sql exception: " + se); + LogWriterUtils.getLogWriter().info("destroy table sql exception: " + se); throw se; } finally { @@ -240,7 +240,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { ds.disconnect(); } catch (Exception e) { - LogWriterSupport.getLogWriter().info("Error in disconnecting from Distributed System"); + LogWriterUtils.getLogWriter().info("Error in disconnecting from Distributed System"); } } @@ -267,7 +267,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { vm0.invoke(IdleTimeOutDUnitTest.class, "runTest1"); AsyncInvocation asyncObj = vm0.invokeAsync(IdleTimeOutDUnitTest.class, "runTest2"); - Threads.join(asyncObj, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj, 30 * 1000); if(asyncObj.exceptionOccurred()){ Assert.fail("asyncObj failed", asyncObj.getException()); } @@ -281,27 +281,27 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { ds = (DataSource) ctx.lookup("java:/XAPooledDataSource"); } catch (NamingException e) { - LogWriterSupport.getLogWriter().info("Naming Exception caught in lookup: " + e); + LogWriterUtils.getLogWriter().info("Naming Exception caught in lookup: " + e); fail("failed in naming lookup: " + e); return; } catch (Exception e) { - LogWriterSupport.getLogWriter().info("Exception caught during naming lookup: " + e); + LogWriterUtils.getLogWriter().info("Exception caught during naming lookup: " + e); fail("failed in naming lookup: " + e); return; } try { for (int count = 0; count < MAX_CONNECTIONS; count++) { ds.getConnection(); - LogWriterSupport.getLogWriter().info("runTest1 :acquired connection #" + count); + LogWriterUtils.getLogWriter().info("runTest1 :acquired connection #" + count); } } catch (SQLException e) { - LogWriterSupport.getLogWriter().info("Success SQLException caught in runTest1: " + e); + LogWriterUtils.getLogWriter().info("Success SQLException caught in runTest1: " + e); fail("runTest1 SQL Exception caught: " + e); } catch (Exception e) { - LogWriterSupport.getLogWriter().info("Exception caught in runTest1: " + e); + LogWriterUtils.getLogWriter().info("Exception caught in runTest1: " + e); fail("Exception caught in runTest1: " + e); e.printStackTrace(); } @@ -317,12 +317,12 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { ds = (DataSource) ctx.lookup("java:/XAPooledDataSource"); } catch (NamingException e) { - LogWriterSupport.getLogWriter().info("Exception caught during naming lookup: " + e); + LogWriterUtils.getLogWriter().info("Exception caught during naming lookup: " + e); fail("failed in naming lookup: " + e); return; } catch (Exception e) { - LogWriterSupport.getLogWriter().info("Exception caught during naming lookup: " + e); + LogWriterUtils.getLogWriter().info("Exception caught during naming lookup: " + e); fail("failed in because of unhandled excpetion: " + e); return; } @@ -330,16 +330,16 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase { for (int count = 0; count < MAX_CONNECTIONS; count++) { Connection con = ds.getConnection(); assertNotNull("Connection object is null", con); - LogWriterSupport.getLogWriter().info("runTest2 :acquired connection #" + count); + LogWriterUtils.getLogWriter().info("runTest2 :acquired connection #" + count); } } catch (SQLException sqle) { - LogWriterSupport.getLogWriter().info("SQLException caught in runTest2: " + sqle); + LogWriterUtils.getLogWriter().info("SQLException caught in runTest2: " + sqle); fail("failed because of SQL exception : " + sqle); sqle.printStackTrace(); } catch (Exception e) { - LogWriterSupport.getLogWriter().info("Exception caught in runTest2: " + e); + LogWriterUtils.getLogWriter().info("Exception caught in runTest2: " + e); fail("failed because of unhandled exception : " + e); e.printStackTrace(); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java index 5362107..c5a4e02 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java @@ -44,9 +44,8 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; import com.gemstone.gemfire.test.dunit.RMIException; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -253,11 +252,11 @@ public class LoginTimeOutDUnitTest extends DistributedTestCase { VM vm0 = host.getVM(0); AsyncInvocation test1 = vm0.invokeAsync(LoginTimeOutDUnitTest.class, "runTest1"); AsyncInvocation test2 = vm0.invokeAsync(LoginTimeOutDUnitTest.class, "runTest2"); - Threads.join(test2, 120 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(test2, 120 * 1000); if(test2.exceptionOccurred()){ Assert.fail("asyncObj failed", test2.getException()); } - Threads.join(test1, 30000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(test1, 30000); } public static void runTest1() throws Exception { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java index 7bd8902..40a165b 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java @@ -41,8 +41,8 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.util.test.TestUtil; @@ -65,7 +65,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { // // sb.append(lineSep); } - LogWriterSupport.getLogWriter().fine("***********\n " + sb); + LogWriterUtils.getLogWriter().fine("***********\n " + sb); return sb.toString(); } @@ -115,20 +115,20 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { * value=\"83f0069202c571faf1ae6c42b4ad46030e4e31c17409e19a\"/>"; */ int n1 = str.indexOf(search); - LogWriterSupport.getLogWriter().fine("Start Index = " + n1); + LogWriterUtils.getLogWriter().fine("Start Index = " + n1); int n2 = str.indexOf(last_search, n1); StringBuffer sbuff = new StringBuffer(str); - LogWriterSupport.getLogWriter().fine("END Index = " + n2); + LogWriterUtils.getLogWriter().fine("END Index = " + n2); String modified_str = sbuff.replace(n1, n2, new_str).toString(); return modified_str; } public static String init(String className) throws Exception { - LogWriterSupport.getLogWriter().fine("PATH11 "); + LogWriterUtils.getLogWriter().fine("PATH11 "); Properties props = new Properties(); int pid = OSProcess.getId(); String path = File.createTempFile("dunit-cachejta_", ".xml").getAbsolutePath(); - LogWriterSupport.getLogWriter().fine("PATH " + path); + LogWriterUtils.getLogWriter().fine("PATH " + path); /** * Return file as string and then modify the string accordingly ** */ String file_as_str = readFile(TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml")); file_as_str = file_as_str.replaceAll("newDB", "newDB_" + pid); @@ -170,7 +170,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { String sql = "create table " + tableName + " (id integer NOT NULL, name varchar(50), CONSTRAINT "+tableName+"_key PRIMARY KEY(id))"; - LogWriterSupport.getLogWriter().fine(sql); + LogWriterUtils.getLogWriter().fine(sql); Connection conn = ds.getConnection(); Statement sm = conn.createStatement(); sm.execute(sql); @@ -179,7 +179,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { for (int i = 1; i <= 10; i++) { sql = "insert into " + tableName + " values (" + i + ",'name" + i + "')"; sm.addBatch(sql); - LogWriterSupport.getLogWriter().fine(sql); + LogWriterUtils.getLogWriter().fine(sql); } sm.executeBatch(); conn.close(); @@ -191,19 +191,19 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { Context ctx = cache.getJNDIContext(); DataSource ds = (DataSource) ctx.lookup("java:/SimpleDataSource"); Connection conn = ds.getConnection(); - LogWriterSupport.getLogWriter().fine(" trying to drop table: " + tableName); + LogWriterUtils.getLogWriter().fine(" trying to drop table: " + tableName); String sql = "drop table " + tableName; Statement sm = conn.createStatement(); sm.execute(sql); conn.close(); } catch (NamingException ne) { - LogWriterSupport.getLogWriter().fine("destroy table naming exception: " + ne); + LogWriterUtils.getLogWriter().fine("destroy table naming exception: " + ne); throw ne; } catch (SQLException se) { if (!se.getMessage().contains("A lock could not be obtained within the time requested")) { - LogWriterSupport.getLogWriter().fine("destroy table sql exception: " + se); + LogWriterUtils.getLogWriter().fine("destroy table sql exception: " + se); throw se; } else { // disregard - this happens sometimes on unit test runs on slower @@ -241,7 +241,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { ds.disconnect(); } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Error in disconnecting from Distributed System"); + LogWriterUtils.getLogWriter().fine("Error in disconnecting from Distributed System"); } } @@ -270,7 +270,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { VM vm0 = host.getVM(0); AsyncInvocation asyncObj = vm0.invokeAsync(MaxPoolSizeDUnitTest.class, "runTest1"); - Threads.join(asyncObj, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj, 30 * 1000); if(asyncObj.exceptionOccurred()){ Assert.fail("asyncObj failed", asyncObj.getException()); } @@ -285,19 +285,19 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { ds = (DataSource) ctx.lookup("java:/XAPooledDataSource"); } catch (NamingException e) { - LogWriterSupport.getLogWriter().fine("Naming Exception caught in lookup: " + e); + LogWriterUtils.getLogWriter().fine("Naming Exception caught in lookup: " + e); fail("failed in naming lookup: " + e); return; } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Exception caught during naming lookup: " + e); + LogWriterUtils.getLogWriter().fine("Exception caught during naming lookup: " + e); fail("failed in naming lookup: " + e); return; } try { for (count = 0; count < MAX_CONNECTIONS; count++) { ds.getConnection(); - LogWriterSupport.getLogWriter().fine("Thread 1 acquired connection #" + count); + LogWriterUtils.getLogWriter().fine("Thread 1 acquired connection #" + count); } fail("expected max connect exception"); } @@ -306,7 +306,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase { Assert.fail("runTest1 SQL Exception", e); } else { - LogWriterSupport.getLogWriter().fine("Success SQLException caught at connection #" + LogWriterUtils.getLogWriter().fine("Success SQLException caught at connection #" + count); } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java index 86482a9..aeb36ea 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java @@ -45,8 +45,8 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.util.test.TestUtil; @@ -138,8 +138,8 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase { AsyncInvocation async1 = vm0.invokeAsync(TransactionTimeOutDUnitTest.class, "runTest1"); AsyncInvocation async2 =vm0.invokeAsync(TransactionTimeOutDUnitTest.class, "runTest2"); - Threads.join(async1, 30 * 1000, LogWriterSupport.getLogWriter()); - Threads.join(async2, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async1, 30 * 1000); + ThreadUtils.join(async2, 30 * 1000); if(async1.exceptionOccurred()){ Assert.fail("async1 failed", async1.getException()); } @@ -216,7 +216,7 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase { return; } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Exception caught " + e); + LogWriterUtils.getLogWriter().fine("Exception caught " + e); fail("failed in naming lookup: " + e); return; } @@ -242,7 +242,7 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase { return; } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Exception caught " + e); + LogWriterUtils.getLogWriter().fine("Exception caught " + e); fail("failed in naming lookup: " + e); return; } @@ -495,7 +495,7 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase { // // sb.append(lineSep); } - LogWriterSupport.getLogWriter().fine("***********\n " + sb); + LogWriterUtils.getLogWriter().fine("***********\n " + sb); return sb.toString(); } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java index 5cfa42f..ded9cd7 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java @@ -46,8 +46,8 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.util.test.TestUtil; @@ -187,7 +187,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { String jtest = System.getProperty("JTESTS"); int pid = OSProcess.getId(); String path = File.createTempFile("dunit-cachejta_", ".xml").getAbsolutePath(); - LogWriterSupport.getLogWriter().fine("PATH " + path); + LogWriterUtils.getLogWriter().fine("PATH " + path); /** * Return file as string and then modify the string accordingly ** */ String file_as_str = readFile(TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml")); file_as_str = file_as_str.replaceAll("newDB", "newDB_" + pid); @@ -213,7 +213,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { } } catch (Exception e) { - LogWriterSupport.getLogWriter().info("", e); + LogWriterUtils.getLogWriter().info("", e); throw new Exception("" + e); } return tableName; @@ -228,7 +228,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { String sql = "create table " + tableName + " (id integer NOT NULL, name varchar(50), CONSTRAINT "+tableName+"_key PRIMARY KEY(id))"; - LogWriterSupport.getLogWriter().fine(sql); + LogWriterUtils.getLogWriter().fine(sql); Connection conn = ds.getConnection(); Statement sm = conn.createStatement(); sm.execute(sql); @@ -237,7 +237,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { for (int i = 1; i <= 10; i++) { sql = "insert into " + tableName + " values (" + i + ",'name" + i + "')"; sm.addBatch(sql); - LogWriterSupport.getLogWriter().fine(sql); + LogWriterUtils.getLogWriter().fine(sql); } sm.executeBatch(); conn.close(); @@ -255,28 +255,28 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { } try { String tableName = tblName; - LogWriterSupport.getLogWriter().fine("Destroying table: " + tableName); + LogWriterUtils.getLogWriter().fine("Destroying table: " + tableName); cache = TxnManagerMultiThreadDUnitTest.getCache(); Context ctx = cache.getJNDIContext(); DataSource ds = (DataSource) ctx.lookup("java:/SimpleDataSource"); Connection conn = ds.getConnection(); - LogWriterSupport.getLogWriter().fine(" trying to drop table: " + tableName); + LogWriterUtils.getLogWriter().fine(" trying to drop table: " + tableName); String sql = "drop table " + tableName; Statement sm = conn.createStatement(); sm.execute(sql); conn.close(); - LogWriterSupport.getLogWriter().fine("destroyTable is Successful!"); + LogWriterUtils.getLogWriter().fine("destroyTable is Successful!"); } catch (NamingException ne) { - LogWriterSupport.getLogWriter().fine("destroy table naming exception: " + ne); + LogWriterUtils.getLogWriter().fine("destroy table naming exception: " + ne); throw ne; } catch (SQLException se) { - LogWriterSupport.getLogWriter().fine("destroy table sql exception: " + se); + LogWriterUtils.getLogWriter().fine("destroy table sql exception: " + se); throw se; } finally { - LogWriterSupport.getLogWriter().fine("Closing cache..."); + LogWriterUtils.getLogWriter().fine("Closing cache..."); closeCache(); } }//end of destroyTable @@ -292,7 +292,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { } } catch (Exception e) { - LogWriterSupport.getLogWriter().warning("exception while creating cache", e); + LogWriterUtils.getLogWriter().warning("exception while creating cache", e); } }//end of startCache @@ -300,18 +300,18 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { try { if (!cache.isClosed()) { cache.close(); - LogWriterSupport.getLogWriter().fine("Cache closed"); + LogWriterUtils.getLogWriter().fine("Cache closed"); } } catch (Exception e) { - LogWriterSupport.getLogWriter().warning("exception while closing cache", e); + LogWriterUtils.getLogWriter().warning("exception while closing cache", e); } try { CacheUtils.ds.disconnect(); - LogWriterSupport.getLogWriter().fine("Disconnected from Distribuited System"); + LogWriterUtils.getLogWriter().fine("Disconnected from Distribuited System"); } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Error in disconnecting from Distributed System"); + LogWriterUtils.getLogWriter().fine("Error in disconnecting from Distributed System"); } }//end of closeCache @@ -351,7 +351,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { /*int rowsDeleted = */jtaObj.deleteRows(tblName_delRows); } catch (Exception e) { - LogWriterSupport.getLogWriter().warning("Error: while deleting rows from database using JTAUtils", e); + LogWriterUtils.getLogWriter().warning("Error: while deleting rows from database using JTAUtils", e); } }//end of delRows @@ -408,11 +408,11 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { //get how many rows actually got committed try { int rows = jtaObj.getRows(tblName); - LogWriterSupport.getLogWriter().fine("Number of rows committed current test method are: " + LogWriterUtils.getLogWriter().fine("Number of rows committed current test method are: " + rows); } catch (Exception e) { - LogWriterSupport.getLogWriter().warning("Error: while getting rows from database using JTAUtils", e); + LogWriterUtils.getLogWriter().warning("Error: while getting rows from database using JTAUtils", e); } }//end of getNumberOfRows @@ -425,7 +425,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { VM vm0 = Host.getHost(0).getVM(0); AsyncInvocation asyncObj1 = vm0.invokeAsync( TxnManagerMultiThreadDUnitTest.class, "callCommitThreads"); - Threads.join(asyncObj1, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj1, 30 * 1000); if(asyncObj1.exceptionOccurred()){ Assert.fail("asyncObj1 failed", asyncObj1.getException()); } @@ -437,15 +437,15 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { * */ public static void callCommitThreads() { - LogWriterSupport.getLogWriter().fine("This is callCommitThreads method"); + LogWriterUtils.getLogWriter().fine("This is callCommitThreads method"); try { - new CommitThread("ct1", LogWriterSupport.getLogWriter()); - new CommitThread("ct2", LogWriterSupport.getLogWriter()); - new CommitThread("ct3", LogWriterSupport.getLogWriter()); - new CommitThread("ct4", LogWriterSupport.getLogWriter()); + new CommitThread("ct1", LogWriterUtils.getLogWriter()); + new CommitThread("ct2", LogWriterUtils.getLogWriter()); + new CommitThread("ct3", LogWriterUtils.getLogWriter()); + new CommitThread("ct4", LogWriterUtils.getLogWriter()); } catch (Exception e) { - LogWriterSupport.getLogWriter().warning("Failed in Commit Threads", e); + LogWriterUtils.getLogWriter().warning("Failed in Commit Threads", e); fail("Failed in Commit Threads" + e); } }//end of callCommitTheads @@ -458,7 +458,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { VM vm0 = Host.getHost(0).getVM(0); AsyncInvocation asyncObj1 = vm0.invokeAsync( TxnManagerMultiThreadDUnitTest.class, "callCommitandRollbackThreads"); - Threads.join(asyncObj1, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj1, 30 * 1000); if(asyncObj1.exceptionOccurred()){ Assert.fail("asyncObj1 failed", asyncObj1.getException()); } @@ -466,16 +466,16 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase { }//end of test3Commit2Rollback public static void callCommitandRollbackThreads() { - LogWriterSupport.getLogWriter().fine("This is callCommitandRollbackThreads method"); + LogWriterUtils.getLogWriter().fine("This is callCommitandRollbackThreads method"); try { - new CommitThread("ct1", LogWriterSupport.getLogWriter()); - new CommitThread("ct2", LogWriterSupport.getLogWriter()); - new CommitThread("ct3", LogWriterSupport.getLogWriter()); - new RollbackThread("rt1", LogWriterSupport.getLogWriter()); - new RollbackThread("rt2", LogWriterSupport.getLogWriter()); + new CommitThread("ct1", LogWriterUtils.getLogWriter()); + new CommitThread("ct2", LogWriterUtils.getLogWriter()); + new CommitThread("ct3", LogWriterUtils.getLogWriter()); + new RollbackThread("rt1", LogWriterUtils.getLogWriter()); + new RollbackThread("rt2", LogWriterUtils.getLogWriter()); } catch (Exception e) { - LogWriterSupport.getLogWriter().info("Failed in Commit and Rollback threads", e); + LogWriterUtils.getLogWriter().info("Failed in Commit and Rollback threads", e); fail("Failed in Commit and Rollback Threads" + e); } }//end of callCommitandRollbackThreads http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java index 879f3e4..1ea6b54 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java @@ -39,8 +39,8 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.util.test.TestUtil; @@ -72,7 +72,7 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase { wr.close(); props.setProperty("cache-xml-file", path); // props.setProperty("mcast-port", "10321"); - props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel()); + props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel()); try { // ds = DistributedSystem.connect(props); ds = (new TxnTimeOutDUnitTest("temp")).getSystem(props); @@ -157,27 +157,27 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase { AsyncInvocation asyncObj5 = vm0.invokeAsync(TxnTimeOutDUnitTest.class, "runTest3",o4); - Threads.join(asyncObj1, 5 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj1, 5 * 60 * 1000); if(asyncObj1.exceptionOccurred()){ Assert.fail("asyncObj1 failed", asyncObj1.getException()); } - Threads.join(asyncObj2, 5 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj2, 5 * 60 * 1000); if(asyncObj2.exceptionOccurred()){ Assert.fail("asyncObj2 failed", asyncObj2.getException()); } - Threads.join(asyncObj3, 5 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj3, 5 * 60 * 1000); if(asyncObj3.exceptionOccurred()){ Assert.fail("asyncObj3 failed", asyncObj3.getException()); } - Threads.join(asyncObj4, 5 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj4, 5 * 60 * 1000); if(asyncObj4.exceptionOccurred()){ Assert.fail("asyncObj4 failed", asyncObj4.getException()); } - Threads.join(asyncObj5, 5 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj5, 5 * 60 * 1000); if(asyncObj5.exceptionOccurred()){ Assert.fail("asyncObj5 failed", asyncObj5.getException()); } @@ -196,12 +196,12 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase { "runTest2"); AsyncInvocation asyncObj2 = vm0.invokeAsync(TxnTimeOutDUnitTest.class, "runTest1"); - Threads.join(asyncObj1, 5 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj1, 5 * 60 * 1000); if(asyncObj1.exceptionOccurred()){ Assert.fail("asyncObj1 failed", asyncObj1.getException()); } - Threads.join(asyncObj2, 5 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncObj2, 5 * 60 * 1000); if(asyncObj2.exceptionOccurred()){ Assert.fail("asyncObj2 failed", asyncObj2.getException()); } @@ -230,7 +230,7 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase { fail("Exception did not occur although was supposed to occur"); } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Exception caught " + e); + LogWriterUtils.getLogWriter().fine("Exception caught " + e); fail("failed in naming lookup: " + e); } finally { @@ -259,7 +259,7 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase { fail("Exception did not occur although was supposed to occur"); } catch (Exception e) { - LogWriterSupport.getLogWriter().fine("Exception caught " + e); + LogWriterUtils.getLogWriter().fine("Exception caught " + e); fail("failed in naming lookup: " + e); } } @@ -303,7 +303,7 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase { // // sb.append(lineSep); } - LogWriterSupport.getLogWriter().fine("***********\n " + sb); + LogWriterUtils.getLogWriter().fine("***********\n " + sb); return sb.toString(); } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java index d1ec86e..32d38c8 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/MergeLogFilesJUnitTest.java @@ -41,7 +41,7 @@ import org.junit.experimental.categories.Category; import com.gemstone.gemfire.LogWriter; import com.gemstone.gemfire.SystemFailure; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; /** @@ -79,7 +79,7 @@ public class MergeLogFilesJUnitTest { for (Iterator iter = workers.iterator(); iter.hasNext(); ) { Worker worker = (Worker) iter.next(); - Threads.join(worker, 120 * 1000, null); + ThreadUtils.join(worker, 120 * 1000); } if (group.exceptionOccurred()) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java index 23ee48d..402ea94 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java @@ -46,7 +46,7 @@ import com.gemstone.gemfire.management.internal.ManagementConstants; import com.gemstone.gemfire.management.internal.SystemManagementService; import com.gemstone.gemfire.management.internal.NotificationHub.NotificationHubListener; import com.gemstone.gemfire.test.dunit.AsyncInvocation; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; @@ -144,7 +144,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase { String log = (String) vm.invoke(CacheManagementDUnitTest.class, "fetchLog"); assertNotNull(log); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "<ExpectedString> Log Of Member is " + log.toString() + "</ExpectedString> "); @@ -660,7 +660,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase { .getMemberMXBean(); JVMMetrics metrics = bean.showJVMMetrics(); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "<ExpectedString> JVMMetrics is " + metrics.toString() + "</ExpectedString> "); @@ -671,7 +671,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase { .getMemberMXBean(); OSMetrics metrics = bean.showOSMetrics(); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "<ExpectedString> OSMetrics is " + metrics.toString() + "</ExpectedString> "); @@ -712,14 +712,14 @@ public class CacheManagementDUnitTest extends ManagementTestBase { MemberMXBean bean = MBeanUtil.getMemberMbeanProxy(member); JVMMetrics metrics = bean.showJVMMetrics(); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "<ExpectedString> JVMMetrics is " + metrics.toString() + "</ExpectedString> "); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "<ExpectedString> OSMetrics is " + metrics.toString() + "</ExpectedString> "); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "<ExpectedString> Boolean Data Check " +bean.isManager() + "</ExpectedString> ");
