http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java index 46eb703..6726747 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java @@ -46,7 +46,7 @@ import com.gemstone.gemfire.internal.cache.control.MemoryThresholds.MemoryState; import com.gemstone.gemfire.internal.cache.lru.HeapEvictor; import com.gemstone.gemfire.test.dunit.Assert; 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; @@ -281,11 +281,11 @@ public class EvictionTestBase extends CacheTestCase { ds = getSystem(props); cache = CacheFactory.create(ds); assertNotNull(cache); - LogWriterSupport.getLogWriter().info("cache= " + cache); - LogWriterSupport.getLogWriter().info("cache closed= " + cache.isClosed()); + LogWriterUtils.getLogWriter().info("cache= " + cache); + LogWriterUtils.getLogWriter().info("cache closed= " + cache.isClosed()); cache.getResourceManager().setEvictionHeapPercentage(85); - LogWriterSupport.getLogWriter().info("eviction= "+cache.getResourceManager().getEvictionHeapPercentage()); - LogWriterSupport.getLogWriter().info("critical= "+cache.getResourceManager().getCriticalHeapPercentage()); + LogWriterUtils.getLogWriter().info("eviction= "+cache.getResourceManager().getEvictionHeapPercentage()); + LogWriterUtils.getLogWriter().info("critical= "+cache.getResourceManager().getCriticalHeapPercentage()); } catch (Exception e) { Assert.fail("Failed while creating the cache", e); @@ -366,7 +366,7 @@ public class EvictionTestBase extends CacheTestCase { region = cache.createRegion(regionName, factory.create()); assertNotNull(region); - LogWriterSupport.getLogWriter().info("Partitioned Region created Successfully :" + region); + LogWriterUtils.getLogWriter().info("Partitioned Region created Successfully :" + region); } public static void putData(final String regionName, final int noOfElememts, @@ -390,7 +390,7 @@ public class EvictionTestBase extends CacheTestCase { final Region pr = cache.getRegion("DR1"); for (int counter = 1; counter <= noOfElememts; counter++) { pr.put(new Integer(counter), new byte[sizeOfElement * 1024 * 1024]); - LogWriterSupport.getLogWriter().info("Amar put data element no->" + counter); + LogWriterUtils.getLogWriter().info("Amar put data element no->" + counter); } } }); @@ -413,7 +413,7 @@ public class EvictionTestBase extends CacheTestCase { if (bucketRegion == null) { continue; } - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "FINAL bucket= " + bucketRegion.getFullPath() + "size= " + bucketRegion.size()); } @@ -428,7 +428,7 @@ public class EvictionTestBase extends CacheTestCase { }; long evictionsInVM1 = (Long)dataStore1.invoke(validate); long evictionsInVM2 = (Long)dataStore2.invoke(validate); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "EEE evicitons = " + noOfEvictions + " " + (evictionsInVM1 + evictionsInVM2)); assertEquals(noOfEvictions, (evictionsInVM1 + evictionsInVM2)); @@ -479,7 +479,7 @@ public class EvictionTestBase extends CacheTestCase { while(itr.hasNext()) { BucketRegion br=(BucketRegion)itr.next(); - LogWriterSupport.getLogWriter().info("Print "+ br.size()); + LogWriterUtils.getLogWriter().info("Print "+ br.size()); } } });
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java index 8c9c82b..86376d9 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java @@ -42,8 +42,8 @@ import com.gemstone.gemfire.internal.cache.partitioned.fixed.FixedPartitioningTe import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil; import com.gemstone.gemfire.test.dunit.Assert; 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.test.dunit.WaitCriterion; @@ -284,7 +284,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase { VM server4 = host.getVM(3); Boolean simpleFPR = false; final int portLocator = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); - final String hostLocator = NetworkSupport.getServerHostName(server1.getHost()); + final String hostLocator = NetworkUtils.getServerHostName(server1.getHost()); final String locator = hostLocator + "[" + portLocator + "]"; server3.invoke(FixedPRSinglehopDUnitTest.class, "startLocatorInVM", new Object[] { portLocator }); @@ -388,7 +388,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase { attr.setPartitionAttributes(paf.create()); region = cache.createRegion(PR_NAME, attr.create()); assertNotNull(region); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Partitioned Region " + PR_NAME + " created Successfully :" + region.toString()); } @@ -434,7 +434,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase { attr.setPartitionAttributes(paf.create()); region = cache.createRegion(PR_NAME, attr.create()); assertNotNull(region); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Partitioned Region " + PR_NAME + " created Successfully :" + region.toString()); } @@ -488,7 +488,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase { attr.setPartitionAttributes(paf.create()); region = cache.createRegion(PR_NAME, attr.create()); assertNotNull(region); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Partitioned Region " + PR_NAME + " created Successfully :" + region.toString()); @@ -605,7 +605,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase { RegionAttributes attrs = factory.create(); region = cache.createRegion(PR_NAME, attrs); assertNotNull(region); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Distributed Region " + PR_NAME + " created Successfully :" + region.toString()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java index 14ad28b..1e714f1 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java @@ -59,7 +59,7 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; 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.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; @@ -2030,8 +2030,8 @@ public class GIIDeltaDUnitTest extends CacheTestCase { RegionFactory f = getCache().createRegionFactory(getRegionAttributes()); // CCRegion = (LocalRegion)f.create(REGION_NAME); LocalRegion lr = (LocalRegion)f.create(REGION_NAME); - LogWriterSupport.getLogWriter().info("In createDistributedRegion, using hydra.getLogWriter()"); - LogWriterSupport.getLogWriter().fine("Unfinished Op limit="+InitialImageOperation.MAXIMUM_UNFINISHED_OPERATIONS); + LogWriterUtils.getLogWriter().info("In createDistributedRegion, using hydra.getLogWriter()"); + LogWriterUtils.getLogWriter().fine("Unfinished Op limit="+InitialImageOperation.MAXIMUM_UNFINISHED_OPERATIONS); } catch (CacheException ex) { Assert.fail("While creating region", ex); } @@ -2099,9 +2099,9 @@ public class GIIDeltaDUnitTest extends CacheTestCase { protected void removeSystemPropertiesInVM(VM vm, final String prop) { SerializableRunnable change = new SerializableRunnable() { public void run() { - LogWriterSupport.getLogWriter().info("Current prop setting: "+prop+"="+System.getProperty(prop)); + LogWriterUtils.getLogWriter().info("Current prop setting: "+prop+"="+System.getProperty(prop)); System.getProperties().remove(prop); - LogWriterSupport.getLogWriter().info(prop+"="+System.getProperty(prop)); + LogWriterUtils.getLogWriter().info(prop+"="+System.getProperty(prop)); } }; vm.invoke(change); @@ -2134,7 +2134,7 @@ public class GIIDeltaDUnitTest extends CacheTestCase { DiskStoreID dsid0 = getMemberID(vm0); DiskStoreID dsid1 = getMemberID(vm1); int compare = dsid0.compareTo(dsid1); - LogWriterSupport.getLogWriter().info("Before assignVMsToPandR, dsid0 is "+dsid0+",dsid1 is "+dsid1+",compare="+compare); + LogWriterUtils.getLogWriter().info("Before assignVMsToPandR, dsid0 is "+dsid0+",dsid1 is "+dsid1+",compare="+compare); if (compare > 0) { P = vm0; R = vm1; @@ -2142,7 +2142,7 @@ public class GIIDeltaDUnitTest extends CacheTestCase { P = vm1; R = vm0; } - LogWriterSupport.getLogWriter().info("After assignVMsToPandR, P is "+P.getPid()+"; R is "+R.getPid()+" for region "+REGION_NAME); + LogWriterUtils.getLogWriter().info("After assignVMsToPandR, P is "+P.getPid()+"; R is "+R.getPid()+" for region "+REGION_NAME); } private DiskStoreID getMemberID(VM vm) { @@ -2196,7 +2196,7 @@ public class GIIDeltaDUnitTest extends CacheTestCase { for (long i:exceptionList) { exceptionListVerified = !rvv.contains(member, i); if (!exceptionListVerified) { - LogWriterSupport.getLogWriter().finer("DeltaGII:missing exception "+i+":"+rvv); + LogWriterUtils.getLogWriter().finer("DeltaGII:missing exception "+i+":"+rvv); break; } } @@ -2205,7 +2205,7 @@ public class GIIDeltaDUnitTest extends CacheTestCase { for (long i = 1; i<=regionversion; i++) { if (!rvv.contains(member, i)) { exceptionListVerified = false; - LogWriterSupport.getLogWriter().finer("DeltaGII:unexpected exception "+i); + LogWriterUtils.getLogWriter().finer("DeltaGII:unexpected exception "+i); break; } } @@ -2221,8 +2221,8 @@ public class GIIDeltaDUnitTest extends CacheTestCase { long gcversion = getRegionVersionForMember(rvv, member, true); boolean exceptionListVerified = verifyExceptionList(member, regionversion, rvv, exceptionList); - LogWriterSupport.getLogWriter().info("DeltaGII:expected:"+expectedRegionVersion+":"+expectedGCVersion); - LogWriterSupport.getLogWriter().info("DeltaGII:actual:"+regionversion+":"+gcversion+":"+exceptionListVerified+":"+rvv); + LogWriterUtils.getLogWriter().info("DeltaGII:expected:"+expectedRegionVersion+":"+expectedGCVersion); + LogWriterUtils.getLogWriter().info("DeltaGII:actual:"+regionversion+":"+gcversion+":"+exceptionListVerified+":"+rvv); boolean match = true; if (expectedRegionVersion != -1) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java index 5569670..f12333f 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java @@ -36,8 +36,8 @@ import com.gemstone.gemfire.internal.AvailablePortHelper; 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.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -81,14 +81,14 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { final Keeper bsKeeper4 = freeTCPPorts.get(5); final int bsPort4 = bsKeeper4.getPort(); - final String host0 = NetworkSupport.getServerHostName(host); + final String host0 = NetworkUtils.getServerHostName(host); final String locators = host0 + "[" + port1 + "]" + "," + host0 + "[" + port2 + "]"; final Properties dsProps = new Properties(); dsProps.setProperty("locators", locators); dsProps.setProperty("mcast-port", "0"); - dsProps.setProperty("log-level", LogWriterSupport.getDUnitLogLevel()); + dsProps.setProperty("log-level", LogWriterUtils.getDUnitLogLevel()); dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false"); keeper1.release(); @@ -126,7 +126,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { Properties props = new Properties(); props.setProperty("mcast-port", "0"); props.setProperty("locators", locators); - dsProps.setProperty("log-level", LogWriterSupport.getDUnitLogLevel()); + dsProps.setProperty("log-level", LogWriterUtils.getDUnitLogLevel()); CacheFactory.create(DistributedSystem.connect(props)); } }; @@ -286,7 +286,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i); CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor(); List others = bsa.fetchBridgeServers(); - LogWriterSupport.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others); + LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others); assertEquals(3, others.size()); others = bsa.fetchControllers(); assertEquals(2, others.size()); @@ -314,7 +314,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i); CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor(); List others = bsa.fetchBridgeServers(); - LogWriterSupport.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others); + LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others); assertEquals(3, others.size()); others = bsa.fetchControllers(); assertEquals(2, others.size()); @@ -590,14 +590,14 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { final Keeper bsKeeper4 = freeTCPPorts.get(5); final int bsPort4 = bsKeeper4.getPort(); - final String host0 = NetworkSupport.getServerHostName(host); + final String host0 = NetworkUtils.getServerHostName(host); final String locators = host0 + "[" + port1 + "]" + "," + host0 + "[" + port2 + "]"; final Properties dsProps = new Properties(); dsProps.setProperty("locators", locators); dsProps.setProperty("mcast-port", "0"); - dsProps.setProperty("log-level", LogWriterSupport.getDUnitLogLevel()); + dsProps.setProperty("log-level", LogWriterUtils.getDUnitLogLevel()); dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false"); keeper1.release(); @@ -635,7 +635,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { props.setProperty("mcast-port", "0"); props.setProperty("locators", locators); props.setProperty("groups", "bs1Group1, bs1Group2"); - props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel()); + props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel()); CacheFactory.create(DistributedSystem.connect(props)); } }); @@ -645,7 +645,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { props.setProperty("mcast-port", "0"); props.setProperty("locators", locators); props.setProperty("groups", "bs2Group1, bs2Group2"); - props.setProperty("log-level", LogWriterSupport.getDUnitLogLevel()); + props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel()); CacheFactory.create(DistributedSystem.connect(props)); } }); @@ -800,7 +800,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i); CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor(); List others = bsa.fetchBridgeServers(); - LogWriterSupport.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others); + LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others); assertEquals(3, others.size()); others = bsa.fetchControllers(); assertEquals(2, others.size()); @@ -828,7 +828,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase { DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i); CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor(); List others = bsa.fetchBridgeServers(); - LogWriterSupport.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others); + LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others); assertEquals(3, others.size()); others = bsa.fetchControllers(); assertEquals(2, others.size()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HABug36773DUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HABug36773DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HABug36773DUnitTest.java index 29ac4a8..25672cf 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HABug36773DUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HABug36773DUnitTest.java @@ -41,8 +41,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; /** @@ -159,7 +159,7 @@ public class HABug36773DUnitTest extends DistributedTestCase public void testDummyForBug36773() { - LogWriterSupport.getLogWriter().info(" This is the dummy test for the Bug 36773"); + LogWriterUtils.getLogWriter().info(" This is the dummy test for the Bug 36773"); } @@ -174,7 +174,7 @@ public class HABug36773DUnitTest extends DistributedTestCase { Region region = cache.getRegion(Region.SEPARATOR + REGION_NAME); assertNotNull(region); - LogWriterSupport.getLogWriter().info("Size of the region " + region.size()); + LogWriterUtils.getLogWriter().info("Size of the region " + region.size()); assertEquals(size, region.size()); } }; @@ -283,7 +283,7 @@ public class HABug36773DUnitTest extends DistributedTestCase new HABug36773DUnitTest("temp").createCache(props); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); - ClientServerTestCase.configureConnectionPool(factory, NetworkSupport.getIPLiteral(), new int[] {PORT1,PORT2}, true, -1, 2, null); + ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getIPLiteral(), new int[] {PORT1,PORT2}, true, -1, 2, null); RegionAttributes attrs = factory.create(); cache.createRegion(REGION_NAME, attrs); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java index 80e26ec..6b07ec7 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java @@ -40,7 +40,7 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessageImpl; import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest; 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; /** @@ -191,7 +191,7 @@ public class HAOverflowMemObjectSizerDUnitTest extends DistributedTestCase { client.invoke(HAOverflowMemObjectSizerDUnitTest.class, "createCacheClient", new Object[] { port1, - NetworkSupport.getServerHostName(client.getHost()) }); + NetworkUtils.getServerHostName(client.getHost()) }); serverVM.invoke(HAOverflowMemObjectSizerDUnitTest.class, "performPut", new Object[] { new Long(0L), new Long(100L) }); @@ -217,7 +217,7 @@ public class HAOverflowMemObjectSizerDUnitTest extends DistributedTestCase { client.invoke(HAOverflowMemObjectSizerDUnitTest.class, "createCacheClient", new Object[] { port2, - NetworkSupport.getServerHostName(client.getHost()) }); + NetworkUtils.getServerHostName(client.getHost()) }); serverVM.invoke(HAOverflowMemObjectSizerDUnitTest.class, "performPut", new Object[] { new Long(101L), new Long(200L) }); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java index c5af9e4..c8f0933 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java @@ -51,7 +51,7 @@ import com.gemstone.gemfire.internal.cache.persistence.BackupManager; import com.gemstone.gemfire.internal.util.IOUtils; import com.gemstone.gemfire.internal.util.TransformUtils; 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; @@ -90,7 +90,7 @@ public class IncrementalBackupDUnitTest extends CacheTestCase { private final SerializableRunnable createRegions = new SerializableRunnable() { @Override public void run() { - Cache cache = getCache(new CacheFactory().set("log-level", LogWriterSupport.getDUnitLogLevel())); + Cache cache = getCache(new CacheFactory().set("log-level", LogWriterUtils.getDUnitLogLevel())); cache.createDiskStoreFactory().setDiskDirs(getDiskDirs()).create("fooStore"); cache.createDiskStoreFactory().setDiskDirs(getDiskDirs()).create("barStore"); getRegionFactory(cache).setDiskStoreName("fooStore").create("fooRegion"); @@ -127,7 +127,7 @@ public class IncrementalBackupDUnitTest extends CacheTestCase { * @param message a message to log. */ private void log(String message) { - LogWriterSupport.getLogWriter().info("[IncrementalBackupDUnitTest] " + message); + LogWriterUtils.getLogWriter().info("[IncrementalBackupDUnitTest] " + message); } /** http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java index a4f8d6d..3aeceec 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java @@ -35,9 +35,9 @@ import com.gemstone.gemfire.cache30.CacheTestCase; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; 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.SerializableRunnable; -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; @@ -142,7 +142,7 @@ public class MapClearGIIDUnitTest extends CacheTestCase { region = new MapClearGIIDUnitTest("dumb object to get cache").getCache().createRegion("map", attr); // region = region.createSubregion("map",attr); - LogWriterSupport.getLogWriter().info("Region in VM0 created "); + LogWriterUtils.getLogWriter().info("Region in VM0 created "); } /* public static void closeCache() { @@ -218,7 +218,7 @@ public class MapClearGIIDUnitTest extends CacheTestCase { } } }); - LogWriterSupport.getLogWriter().info("Cache created in VM1 successfully"); + LogWriterUtils.getLogWriter().info("Cache created in VM1 successfully"); try { AsyncInvocation asyncGII = vm0.invokeAsync(MapClearGIIDUnitTest.class, "createRegionInVm0"); @@ -240,7 +240,7 @@ public class MapClearGIIDUnitTest extends CacheTestCase { // now that the gii has received some entries do the clear vm1.invoke(MapClearGIIDUnitTest.class, "clearRegionInVm1"); // wait for GII to complete - Threads.join(asyncGII, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncGII, 30 * 1000); if (asyncGII.exceptionOccurred()) { Throwable t = asyncGII.getException(); Assert.fail("createRegionInVM0 failed", t); @@ -271,13 +271,13 @@ public class MapClearGIIDUnitTest extends CacheTestCase { public static class CacheObserverImpl extends CacheObserverAdapter { public void afterRegionClear(RegionEvent event) { - LogWriterSupport.getLogWriter().info("**********Received clear event in VM0 . "); + LogWriterUtils.getLogWriter().info("**********Received clear event in VM0 . "); Region rgn = event.getRegion(); wasGIIInProgressDuringClear = ((LocalRegion) rgn).getImageState() .wasRegionClearedDuringGII(); InitialImageOperation.slowImageProcessing = 0; InitialImageOperation.slowImageSleeps = 0; - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "wasGIIInProgressDuringClear when clear event was received= " + wasGIIInProgressDuringClear); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterface2JUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterface2JUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterface2JUnitTest.java index 4704955..0129ec6 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterface2JUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterface2JUnitTest.java @@ -41,7 +41,7 @@ import com.gemstone.gemfire.cache.query.CacheUtils; import com.gemstone.gemfire.cache.query.data.Portfolio; import com.gemstone.gemfire.cache.util.CacheListenerAdapter; import com.gemstone.gemfire.internal.util.StopWatch; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; /** @@ -221,7 +221,7 @@ public class MapInterface2JUnitTest { callbackSync.notify(); } } - Threads.join(th, 30 * 1000, null); + ThreadUtils.join(th, 30 * 1000); } @@ -274,7 +274,7 @@ public class MapInterface2JUnitTest { }catch (Exception cwe) { fail("The test experienced exception "+cwe); } - Threads.join(th, 30 * 1000, null); + ThreadUtils.join(th, 30 * 1000); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java index 4243b7a..f49a4c6 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java @@ -36,7 +36,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver; import com.gemstone.gemfire.internal.cache.SearchLoadAndWriteProcessor.NetSearchRequestMessage; 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.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -196,7 +196,7 @@ public class NetSearchMessagingDUnitTest extends CacheTestCase { LocalRegion region = (LocalRegion)cache.getRegion("region"); RegionEntry re = region.getRegionEntry("a"); Object o = re.getValueInVM(null); - LogWriterSupport.getLogWriter().info("key a="+o);; + LogWriterUtils.getLogWriter().info("key a="+o);; return o == null || o == Token.NOT_AVAILABLE; } }; @@ -218,7 +218,7 @@ public class NetSearchMessagingDUnitTest extends CacheTestCase { for (String key: keys) { RegionEntry re = region.getRegionEntry(key); Object o = re.getValueInVM(null); - LogWriterSupport.getLogWriter().info("key " + key + "=" + o); + LogWriterUtils.getLogWriter().info("key " + key + "=" + o); assertTrue("expected key " + key + " to not be evicted", (o != null) && (o != Token.NOT_AVAILABLE)); } @@ -336,9 +336,9 @@ public class NetSearchMessagingDUnitTest extends CacheTestCase { public Object call() { Cache cache = getCache(); Region region = cache.getRegion("region"); - LogWriterSupport.getLogWriter().info("putting key="+key+"="+value); + LogWriterUtils.getLogWriter().info("putting key="+key+"="+value); Object result = region.put(key, value); - LogWriterSupport.getLogWriter().info("done putting key="+key); + LogWriterUtils.getLogWriter().info("done putting key="+key); return result; } }); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java index c344f2a..708b983 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java @@ -27,7 +27,7 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.Resou import com.gemstone.gemfire.internal.cache.lru.HeapEvictor; import com.gemstone.gemfire.test.dunit.Assert; 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.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; @@ -74,12 +74,12 @@ public class OffHeapEvictionDUnitTest extends EvictionDUnitTest { ds = getSystem(getDistributedSystemProperties()); cache = CacheFactory.create(ds); assertNotNull(cache); - LogWriterSupport.getLogWriter().info("cache= " + cache); - LogWriterSupport.getLogWriter().info("cache closed= " + cache.isClosed()); + LogWriterUtils.getLogWriter().info("cache= " + cache); + LogWriterUtils.getLogWriter().info("cache closed= " + cache.isClosed()); cache.getResourceManager().setEvictionOffHeapPercentage(85); ((GemFireCacheImpl) cache).getResourceManager().getOffHeapMonitor().stopMonitoring(true); - LogWriterSupport.getLogWriter().info("eviction= "+cache.getResourceManager().getEvictionOffHeapPercentage()); - LogWriterSupport.getLogWriter().info("critical= "+cache.getResourceManager().getCriticalOffHeapPercentage()); + LogWriterUtils.getLogWriter().info("eviction= "+cache.getResourceManager().getEvictionOffHeapPercentage()); + LogWriterUtils.getLogWriter().info("critical= "+cache.getResourceManager().getCriticalOffHeapPercentage()); } catch (Exception e) { Assert.fail("Failed while creating the cache", e); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java index 2851411..f574e99 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java @@ -23,7 +23,7 @@ import com.gemstone.gemfire.distributed.DistributedSystem; import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.test.dunit.Assert; 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.SerializableRunnable; /** @@ -70,11 +70,11 @@ public class OffHeapEvictionStatsDUnitTest extends EvictionStatsDUnitTest { ds = getSystem(getDistributedSystemProperties()); cache = CacheFactory.create(ds); assertNotNull(cache); - LogWriterSupport.getLogWriter().info("cache= " + cache); - LogWriterSupport.getLogWriter().info("cache closed= " + cache.isClosed()); + LogWriterUtils.getLogWriter().info("cache= " + cache); + LogWriterUtils.getLogWriter().info("cache closed= " + cache.isClosed()); cache.getResourceManager().setEvictionOffHeapPercentage(20); - LogWriterSupport.getLogWriter().info("eviction= "+cache.getResourceManager().getEvictionOffHeapPercentage()); - LogWriterSupport.getLogWriter().info("critical= "+cache.getResourceManager().getCriticalOffHeapPercentage()); + LogWriterUtils.getLogWriter().info("eviction= "+cache.getResourceManager().getEvictionOffHeapPercentage()); + LogWriterUtils.getLogWriter().info("critical= "+cache.getResourceManager().getCriticalOffHeapPercentage()); } catch (Exception e) { Assert.fail("Failed while creating the cache", e); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java index bcc20c3..1d9213e 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java @@ -57,7 +57,7 @@ import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.cache.util.CacheWriterAdapter; import com.gemstone.gemfire.internal.InternalDataSerializer; import com.gemstone.gemfire.internal.cache.Oplog.OPLOG_TYPE; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; @@ -1678,7 +1678,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase }); assertNull(conflated); th.start(); - Threads.join(th, 30 * 1000, null); + ThreadUtils.join(th, 30 * 1000); LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = false; } @@ -2094,7 +2094,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase finally { ((LocalRegion)region).getDiskRegion().releaseWriteLock(); } - Threads.join(th, 30 * 1000, null); + ThreadUtils.join(th, 30 * 1000); region.close(); region = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache, diskProps, Scope.LOCAL); @@ -3170,7 +3170,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase } }); try { - Threads.join(clearOp, 30 * 1000, null); + ThreadUtils.join(clearOp, 30 * 1000); } catch (Exception e) { testFailed = true; @@ -3237,7 +3237,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase }); clearTh.start(); try { - Threads.join(clearTh, 120 * 1000, null); + ThreadUtils.join(clearTh, 120 * 1000); failure = clearTh.isAlive(); failureCause = "Clear Thread still running !"; } catch(Exception e) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIDUnitTest.java index 96994e8..466dfa4 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIDUnitTest.java @@ -47,7 +47,7 @@ import com.gemstone.gemfire.distributed.internal.ReplyException; import com.gemstone.gemfire.internal.cache.PartitionedRegion; 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.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -172,7 +172,7 @@ public class PartitionedRegionAPIDUnitTest extends RegionAttributes regionAttribs = attr.create(); cache.createRegion("PR1", regionAttribs); - LogWriterSupport.getLogWriter().info("Region created in VM1."); + LogWriterUtils.getLogWriter().info("Region created in VM1."); } }; @@ -192,12 +192,12 @@ public class PartitionedRegionAPIDUnitTest extends for (int b = 0; b < numBucks; b++) { if (par.getBucketKeys(b).contains(key)) { foundIt = true; - LogWriterSupport.getLogWriter().severe("Key " + key + " found in bucket " + b); + LogWriterUtils.getLogWriter().severe("Key " + key + " found in bucket " + b); break; } } if (!foundIt) { - LogWriterSupport.getLogWriter().severe("Key " + key + " not found in any bucket"); + LogWriterUtils.getLogWriter().severe("Key " + key + " not found in any bucket"); } return foundIt; } @@ -348,8 +348,8 @@ public class PartitionedRegionAPIDUnitTest extends "<ExpectedException action=remove>" + entryNotFoundException + "</ExpectedException>"); - LogWriterSupport.getLogWriter().fine("Out of doPutOperations1"); - LogWriterSupport.getLogWriter().fine("All the puts done successfully for vm0."); + LogWriterUtils.getLogWriter().fine("Out of doPutOperations1"); + LogWriterUtils.getLogWriter().fine("All the puts done successfully for vm0."); } }); @@ -507,8 +507,8 @@ public class PartitionedRegionAPIDUnitTest extends + entryNotFoundException + "</ExpectedException>"); - LogWriterSupport.getLogWriter().fine("Out of doPutOperations2"); - LogWriterSupport.getLogWriter().fine("All the puts done successfully for vm1."); + LogWriterUtils.getLogWriter().fine("Out of doPutOperations2"); + LogWriterUtils.getLogWriter().fine("All the puts done successfully for vm1."); } }); } @@ -655,7 +655,7 @@ public class PartitionedRegionAPIDUnitTest extends size = pr.size(); assertEquals("Size doesnt return expected value", size, 10); // } - LogWriterSupport.getLogWriter().fine( + LogWriterUtils.getLogWriter().fine( "All the puts done successfully for vm0."); @@ -796,7 +796,7 @@ public class PartitionedRegionAPIDUnitTest extends "<ExpectedException action=remove>" + entryNotFoundException + "</ExpectedException>"); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .fine("All the remove done successfully for vm0."); } }); @@ -1019,7 +1019,7 @@ public class PartitionedRegionAPIDUnitTest extends assertTrue("containsKey() Validation failed for key = " + i, conKey); } - LogWriterSupport.getLogWriter().fine( + LogWriterUtils.getLogWriter().fine( "containsKey() Validated entry for key = " + i); } @@ -1037,7 +1037,7 @@ public class PartitionedRegionAPIDUnitTest extends "containsValueForKey() Validation failed for key = " + i, conKey); } - LogWriterSupport.getLogWriter().fine( + LogWriterUtils.getLogWriter().fine( "containsValueForKey() Validated entry for key = " + i); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java index 32da685..79669b2 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java @@ -39,9 +39,9 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; import com.gemstone.gemfire.test.dunit.Host; 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.SerializableRunnable; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; /** @@ -118,22 +118,22 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends // put(). validateBucket2NodeBeforePutInMultiplePartitionedRegion( startIndexForRegion, endIndexForRegion); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Bucket2Node region of partition regions before any put() successfully validated "); // doing put() operation on multiple partition region putInMultiplePartitionedRegion(startIndexForRegion, endIndexForRegion, startIndexForKey, endIndexForKey); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Put() operation successfully in partition regions"); // validating bucket regions of multiple partition regions. validateBucketsAfterPutInMultiplePartitionRegion(startIndexForRegion, endIndexForRegion); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Bucket regions of partition regions successfully validated"); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "testBucketCerationInMultiPlePartitionRegion() Successfully completed"); } @@ -171,23 +171,23 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion, localMaxMemory, redundancy); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Partition Regions successfully created "); // doing put() operation from vm0 only putInMultiplePartitionRegionFromOneVm(vm[0], startIndexForRegion, endIndexForRegion, startIndexForKey, endIndexForKey); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Put() Opereration done only from one VM "); // validating bucket distribution ovar all the nodes int noBucketsExpectedOnEachNode = getNoBucketsExpectedOnEachNode(); validateBucketsDistributionInMultiplePartitionRegion(startIndexForRegion, endIndexForRegion, noBucketsExpectedOnEachNode); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Bucket regions are equally distributed"); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "testBucketCerationInMultiPlePartitionRegion() successfully completed"); } @@ -229,23 +229,23 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends // creating multiple partition regions on 3 nodes with localMaxMemory=200 redundancy = 0 createPartitionRegion(vmList, startIndexForRegion, endIndexForRegion, localMaxMemory, redundancy); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Partition Regions successfully created "); // doing put() operation from all vms putInMultiplePartitionedRegionFromAllVms(startIndexForRegion, endIndexForRegion, startIndexForKey, endIndexForKey); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Put() Opereration done only from one VM "); // validating bucket distribution ovar all the nodes int noBucketsExpectedOnEachNode = getNoBucketsExpectedOnEachNode() - 4; validateBucketsDistributionInMultiplePartitionRegion(startIndexForRegion, endIndexForRegion, noBucketsExpectedOnEachNode); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Bucket regions are equally distributed"); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "testBucketCerationInMultiPlePartitionRegion() successfully created"); } @@ -298,7 +298,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends // doing put() in multiple partition regions from 3 nodes. putInMultiplePartitionedRegionFrom3Nodes(startIndexForRegion, endIndexForRegion, startIndexForKey, endIndexForKey); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketDistributionAfterNodeAdditionInPR() - Put() operation successfully in partition regions on 3 Nodes"); @@ -316,15 +316,15 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends // doing put() in multiple partition regions from 3 nodes. putInMultiplePartitionedRegionFrom3Nodes(startIndexForRegion, endIndexForRegion, startIndexForKey, endIndexForKey); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketDistributionAfterNodeAdditionInPR() - Put() operation successfully in partition regions on 4th node"); // validating bucket creation in the 4th node validateBucketsOnAllNodes(startIndexForRegion, endIndexForRegion); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketDistributionAfterNodeAdditionInPR() - buckets on all the nodes are validated"); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "testBucketDistributionAfterNodeAdditionInPR() successfully created"); } @@ -370,7 +370,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends endIndexForRegion, startIndexForKey, endIndexForKey); validateTotalNumBuckets(prPrefix, vmList, startIndexForRegion, endIndexForRegion, expectedNumBuckets); - LogWriterSupport.getLogWriter().info("testTotalNumBucketProperty() completed successfully"); + LogWriterUtils.getLogWriter().info("testTotalNumBucketProperty() completed successfully"); } @@ -515,7 +515,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { @@ -557,7 +557,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { if (async[count].exceptionOccurred()) { @@ -590,7 +590,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { @@ -628,7 +628,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { @@ -700,7 +700,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { @@ -745,7 +745,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { @@ -774,12 +774,12 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends startIndexForRegion, endIndexForRegion)); /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { if (async[count].exceptionOccurred()) { - LogWriterSupport.getLogWriter().warning("Failure in async invocation on vm " + LogWriterUtils.getLogWriter().warning("Failure in async invocation on vm " + vm[count] + " with exception " + async[count].getException()); throw async[count].getException(); @@ -810,7 +810,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < 4; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < 4; count++) { @@ -831,12 +831,12 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 4; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 4; count < AsyncInvocationArrSize; count++) { if (async[count].exceptionOccurred()) { - LogWriterSupport.getLogWriter().warning("Failure of async invocation on VM " + + LogWriterUtils.getLogWriter().warning("Failure of async invocation on VM " + this.vm[count] + " exception thrown " + async[count].getException()); throw async[count].getException(); } @@ -865,7 +865,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { @@ -951,12 +951,12 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends } if (redundancyManageFlag == 0) { - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "validateRedundancy() - Redundancy not satisfied for the partition region : " + pr.getName()); } else { - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "validateRedundancy() - Redundancy satisfied for the partition region : " + pr.getName()); } @@ -1142,7 +1142,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends assertTrue(pr.getRegionAdvisor().getNumProfiles() > 0); assertTrue(pr.getRegionAdvisor().getNumDataStores() > 0); final int bucketSetSize = pr.getRegionAdvisor().getCreatedBucketsCount(); - LogWriterSupport.getLogWriter().info("BucketSet size " + bucketSetSize); + LogWriterUtils.getLogWriter().info("BucketSet size " + bucketSetSize); if (bucketSetSize != 0) { Set buckets = pr.getRegionAdvisor().getBucketSet(); Iterator it = buckets.iterator(); @@ -1156,7 +1156,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends numBucketsWithStorage++; } } catch (NoSuchElementException end) { - LogWriterSupport.getLogWriter().info("BucketSet iterations " + numBucketsWithStorage); + LogWriterUtils.getLogWriter().info("BucketSet iterations " + numBucketsWithStorage); } fail("There should be no buckets assigned"); } @@ -1188,7 +1188,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends assertNotNull(pr.getDataStore()); final int localBSize = pr.getDataStore().getBucketsManaged(); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "validateBucketsDistribution() - Number of bukctes for " + pr.getName() + " : " + localBSize); @@ -1263,7 +1263,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends cache.createRegion(prPrefix + i, createRegionAttrs(redundancy, localMaxMem, numBuckets)); } - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "createMultiplePartitionRegion() - Partition Regions Successfully Completed "); } @@ -1309,7 +1309,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends Set bucketsWithStorage = pr.getRegionAdvisor().getBucketSet(); assertEquals(expectedNumBuckets, bucketsWithStorage.size()); } - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Total Number of buckets validated in partition region"); } }; @@ -1382,7 +1382,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends createPartitionRegion(vmList, midIndexForRegion, endIndexForNode, localMaxMemory, redundancyTwo); - LogWriterSupport.getLogWriter() + LogWriterUtils.getLogWriter() .info( "testBucketCerationInMultiPlePartitionRegion() - Partition Regions successfully created "); } @@ -1394,7 +1394,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends { for (int i = 0; i < 4; i++) { if (vm[i] == null) - LogWriterSupport.getLogWriter().fine("VM is null" + vm[i]); + LogWriterUtils.getLogWriter().fine("VM is null" + vm[i]); vm[i].invoke(calculateMemoryOfPartitionRegion(i, i + 1)); } } @@ -1430,7 +1430,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends while (sizeItr.hasNext()) { assertEquals(sizeItr.next(), objSize); } - LogWriterSupport.getLogWriter().info("Size of partition region on each node is equal"); + LogWriterUtils.getLogWriter().info("Size of partition region on each node is equal"); } }; vm[0].invoke(testTotalMemory); @@ -1508,7 +1508,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } /** testing whether exception occurred */ for (int count = 0; count < AsyncInvocationArrSize; count++) { @@ -1533,9 +1533,9 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends .getRegion(Region.SEPARATOR + regionName); for (int i = 0; i < MAX_SIZE * 2; i++) { pr.put(key + i, Obj); - LogWriterSupport.getLogWriter().info("MAXSIZE : " + i); + LogWriterUtils.getLogWriter().info("MAXSIZE : " + i); } - LogWriterSupport.getLogWriter().info("Put successfully done for vm" + key); + LogWriterUtils.getLogWriter().info("Put successfully done for vm" + key); } }; return putForLocalMaxMemory; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java index e6fd02b..8fd6f4e 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java @@ -30,7 +30,7 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; import com.gemstone.gemfire.test.dunit.Host; -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; @@ -102,7 +102,7 @@ public class PartitionedRegionCacheCloseDUnitTest extends key = new Integer(k); pr.put(key, rName + k); } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter() + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter() .info("VM0 Done put successfully for PR = " + rName + j); } } @@ -123,13 +123,13 @@ public class PartitionedRegionCacheCloseDUnitTest extends key = new Integer(k); pr.put(key, rName + k); } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter() + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter() .info("VM1 Done put successfully for PR = " + rName + j); } } }); - Threads.join(async0, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); - Threads.join(async1, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async0, 30 * 1000); + ThreadUtils.join(async1, 30 * 1000); if(async0.exceptionOccurred()) { Assert.fail("Exception during async0", async0.getException()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java index 7a82c4a..78c70dc 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java @@ -38,9 +38,9 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; 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.LogWriterUtils; import com.gemstone.gemfire.test.dunit.SerializableRunnable; -import com.gemstone.gemfire.test.dunit.Threads; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; @SuppressWarnings("serial") @@ -68,7 +68,7 @@ public class PartitionedRegionCreationDUnitTest extends */ public void testSequentialCreation() throws Exception { - LogWriterSupport.getLogWriter().info("*****CREATION TEST ACK STARTED*****"); + LogWriterUtils.getLogWriter().info("*****CREATION TEST ACK STARTED*****"); final String name = getUniqueName(); Host host = Host.getHost(0); VM vm0 = host.getVM(0); @@ -91,7 +91,7 @@ public class PartitionedRegionCreationDUnitTest extends vm1.invoke(getCacheSerializableRunnableForPRValidate(name)); vm2.invoke(getCacheSerializableRunnableForPRValidate(name)); vm3.invoke(getCacheSerializableRunnableForPRValidate(name)); - LogWriterSupport.getLogWriter().info("*****CREATION TEST ACK ENDED*****"); + LogWriterUtils.getLogWriter().info("*****CREATION TEST ACK ENDED*****"); } /** @@ -104,7 +104,7 @@ public class PartitionedRegionCreationDUnitTest extends // 2/8/06 public void testConcurrentCreation() throws Throwable { - LogWriterSupport.getLogWriter().info("*****CREATION TEST NO_ACK STARTED*****"); + LogWriterUtils.getLogWriter().info("*****CREATION TEST NO_ACK STARTED*****"); final String name = getUniqueName(); Host host = Host.getHost(0); VM vm0 = host.getVM(0); @@ -124,7 +124,7 @@ public class PartitionedRegionCreationDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < AsyncInvocationArrSize; count++) { @@ -138,7 +138,7 @@ public class PartitionedRegionCreationDUnitTest extends vm1.invoke(getCacheSerializableRunnableForPRValidate(name)); vm2.invoke(getCacheSerializableRunnableForPRValidate(name)); vm3.invoke(getCacheSerializableRunnableForPRValidate(name)); - LogWriterSupport.getLogWriter().info("*****CREATION TEST NO_ACK ENDED*****"); + LogWriterUtils.getLogWriter().info("*****CREATION TEST NO_ACK ENDED*****"); } /** @@ -254,7 +254,7 @@ public class PartitionedRegionCreationDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } th.join(30 * 1000); @@ -427,7 +427,7 @@ public class PartitionedRegionCreationDUnitTest extends VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); VM vm3 = host.getVM(3); - LogWriterSupport.getLogWriter().info("*****INITIALIZATION TEST STARTED*****"); + LogWriterUtils.getLogWriter().info("*****INITIALIZATION TEST STARTED*****"); int AsyncInvocationArrSize = 8; AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize]; async[0] = vm0.invokeAsync(getCacheSerializableRunnableForPRCreate(name, @@ -441,7 +441,7 @@ public class PartitionedRegionCreationDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < 4; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < 4; count++) { @@ -457,7 +457,7 @@ public class PartitionedRegionCreationDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 4; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 4; count < AsyncInvocationArrSize; count++) { @@ -465,7 +465,7 @@ public class PartitionedRegionCreationDUnitTest extends Assert.fail("exception during " + count, async[count].getException()); } } - LogWriterSupport.getLogWriter().info("*****INITIALIZATION TEST ENDED*****"); + LogWriterUtils.getLogWriter().info("*****INITIALIZATION TEST ENDED*****"); } /** @@ -483,7 +483,7 @@ public class PartitionedRegionCreationDUnitTest extends VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); VM vm3 = host.getVM(3); - LogWriterSupport.getLogWriter().info("*****REGISTRATION TEST STARTED*****"); + LogWriterUtils.getLogWriter().info("*****REGISTRATION TEST STARTED*****"); int AsyncInvocationArrSize = 8; AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize]; async[0] = vm0.invokeAsync(getCacheSerializableRunnableForPRCreate(name, @@ -497,7 +497,7 @@ public class PartitionedRegionCreationDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 0; count < 4; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 0; count < 4; count++) { @@ -517,7 +517,7 @@ public class PartitionedRegionCreationDUnitTest extends /** main thread is waiting for the other threads to complete */ for (int count = 4; count < AsyncInvocationArrSize; count++) { - Threads.join(async[count], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async[count], 30 * 1000); } for (int count = 4; count < AsyncInvocationArrSize; count++) { @@ -525,7 +525,7 @@ public class PartitionedRegionCreationDUnitTest extends Assert.fail("exception during " + count, async[count].getException()); } } - LogWriterSupport.getLogWriter().info("*****REGISTRATION TEST ENDED*****"); + LogWriterUtils.getLogWriter().info("*****REGISTRATION TEST ENDED*****"); } /** @@ -543,13 +543,13 @@ public class PartitionedRegionCreationDUnitTest extends VM dataStore1 = host.getVM(1); VM accessor0 = host.getVM(2); VM accessor1 = host.getVM(3); - LogWriterSupport.getLogWriter().info("*****PERSISTENCE CONFLICTS TEST STARTED*****"); + LogWriterUtils.getLogWriter().info("*****PERSISTENCE CONFLICTS TEST STARTED*****"); accessor0.invoke(getCacheSerializableRunnableForPRPersistence(name, 0, false, false)); accessor1.invoke(getCacheSerializableRunnableForPRPersistence(name, 0, true, true)); dataStore0.invoke(getCacheSerializableRunnableForPRPersistence(name, 100, true, false)); dataStore1.invoke(getCacheSerializableRunnableForPRPersistence(name, 100, false, true)); - LogWriterSupport.getLogWriter().info("*****PERSISTENCE CONFLICTS TEST ENDED*****"); + LogWriterUtils.getLogWriter().info("*****PERSISTENCE CONFLICTS TEST ENDED*****"); } /** @@ -629,7 +629,7 @@ public class PartitionedRegionCreationDUnitTest extends + name + " configs do not exists in region - " + root.getName()); } - LogWriterSupport.getLogWriter().info(" PartitionedRegionCreationTest PartionedRegionRegistrationTest() Successfully Complete .. "); + LogWriterUtils.getLogWriter().info(" PartitionedRegionCreationTest PartionedRegionRegistrationTest() Successfully Complete .. "); } }; return (CacheSerializableRunnable)registerPrRegion; @@ -695,11 +695,11 @@ public class PartitionedRegionCreationDUnitTest extends getCache().getLogger().warning( "Creation caught IllegalStateException", ex); if (exceptionType.equals("GLOBAL")) - LogWriterSupport.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for scope = GLOBAL"); + LogWriterUtils.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for scope = GLOBAL"); if (exceptionType.equals("REDUNDANCY")) - LogWriterSupport.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for 0 > redundancy > 3 "); + LogWriterUtils.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for 0 > redundancy > 3 "); if (exceptionType.equals("DIFFREG")) - LogWriterSupport.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for regions with diff scope "); + LogWriterUtils.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for regions with diff scope "); } assertNotNull("Partitioned Region " + regionName + " not in cache", cache.getRegion(regionName)); @@ -733,11 +733,11 @@ public class PartitionedRegionCreationDUnitTest extends getCache().getLogger().warning( "Creation caught IllegalStateException", ex); if (exceptionType.equals("GLOBAL")) - LogWriterSupport.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for scope = GLOBAL"); + LogWriterUtils.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for scope = GLOBAL"); if (exceptionType.equals("REDUNDANCY")) - LogWriterSupport.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for 0 > redundancy > 3 "); + LogWriterUtils.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for 0 > redundancy > 3 "); if (exceptionType.equals("DIFFREG")) - LogWriterSupport.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for regions with diff scope "); + LogWriterUtils.getLogWriter().info("PartitionedRegionCreationDUnitTest:testPartitionedRegionCreationExceptions() Got a Correct exception for regions with diff scope "); } assertNotNull("Partitioned Region " + rName + " not in cache", cache.getRegion(rName)); @@ -870,7 +870,7 @@ public class PartitionedRegionCreationDUnitTest extends RegionAttributes regionAttribs = attr.create(); PartitionedRegion accessor = (PartitionedRegion)cache.createRegion( "PR1", regionAttribs); - LogWriterSupport.getLogWriter().info("Region created in VM1."); + LogWriterUtils.getLogWriter().info("Region created in VM1."); assertEquals(accessor.getTotalNumberOfBuckets(), PartitionAttributesFactory.GLOBAL_MAX_BUCKETS_DEFAULT); try { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java index 1411e6c..cd6e980 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java @@ -199,10 +199,10 @@ public class PartitionedRegionDUnitTestCase extends CacheTestCase prPrefix + i, PartitionedRegionTestHelper.createRegionAttrsForPR(redundancy, localmaxMemory, recoveryDelay)); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Created Region new --- " + prPrefix + i); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Created Region new --- " + prPrefix + i); } catch (RegionExistsException ignore) {} } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("getCreateMultiplePRregion() - Partition Regions Successfully Completed "); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("getCreateMultiplePRregion() - Partition Regions Successfully Completed "); } }; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java index 7688678..e5a95cd 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java @@ -31,9 +31,9 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; 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.SerializableRunnable; -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; @@ -80,7 +80,7 @@ public class PartitionedRegionDestroyDUnitTest extends cache.createRegion(PR_PREFIX + i, createRegionAttrsForPR(0, 200)); } - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Successfully created " + MAX_REGIONS + " PartitionedRegions."); } }; @@ -159,7 +159,7 @@ public class PartitionedRegionDestroyDUnitTest extends } } catch (RegionDestroyedException e) { - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "RegionDestroyedException occured for Region = " + PR_PREFIX + j); } getCache().getLogger().info("<ExpectedException action=remove>" + @@ -167,7 +167,7 @@ public class PartitionedRegionDestroyDUnitTest extends } }); - Threads.join(async1, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async1, 30 * 1000); if(async1.exceptionOccurred()) { Assert.fail("async1 failed", async1.getException()); } @@ -228,18 +228,18 @@ public class PartitionedRegionDestroyDUnitTest extends // Assert that all PartitionedRegions are gone assertEquals(0, rootRegion.size()); - LogWriterSupport.getLogWriter().info("allPartitionedRegions size() =" + rootRegion.size()); + LogWriterUtils.getLogWriter().info("allPartitionedRegions size() =" + rootRegion.size()); assertEquals("ThePrIdToPR Map size is:"+PartitionedRegion.prIdToPR.size()+" instead of 0", MAX_REGIONS, PartitionedRegion.prIdToPR.size()); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "PartitionedRegion.prIdToPR.size() =" + PartitionedRegion.prIdToPR.size()); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "# of Subregions of root Region after destroy call = " + rootRegion.subregions(false).size()); Iterator itr = (rootRegion.subregions(false)).iterator(); while (itr.hasNext()) { Region rg = (Region)itr.next(); - LogWriterSupport.getLogWriter().info("Root Region SubRegionName = " + rg.getName()); + LogWriterUtils.getLogWriter().info("Root Region SubRegionName = " + rg.getName()); // assertEquals("REGION NAME FOUND:"+rg.getName(),-1, rg.getName().indexOf( // PartitionedRegionHelper.BUCKET_2_NODE_TABLE_PREFIX)); assertEquals("regionFound that should be gone!:"+rg.getName(),-1, rg.getName().indexOf( http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHADUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHADUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHADUnitTest.java index acc4f5b..3f4edf1 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHADUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHADUnitTest.java @@ -39,10 +39,10 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.Resou import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; 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.Threads; +import com.gemstone.gemfire.test.dunit.ThreadUtils; import com.gemstone.gemfire.test.dunit.VM; /** @@ -248,14 +248,14 @@ public class PartitionedRegionHADUnitTest extends PartitionedRegionDUnitTestCase public void run2() throws CacheException { getCache().getLogger().info("<ExpectedException action=add>" + expectedExceptions + "</ExpectedException>"); - LogWriterSupport.getLogWriter().info("<ExpectedException action=add>" + + LogWriterUtils.getLogWriter().info("<ExpectedException action=add>" + expectedExceptions + "</ExpectedException>"); } }; SerializableRunnable removeExpectedExceptions = new CacheSerializableRunnable("removeExpectedExceptions") { public void run2() throws CacheException { - LogWriterSupport.getLogWriter().info("<ExpectedException action=remove>" + + LogWriterUtils.getLogWriter().info("<ExpectedException action=remove>" + expectedExceptions + "</ExpectedException>"); getCache().getLogger().info("<ExpectedException action=remove>" + expectedExceptions + "</ExpectedException>"); @@ -273,7 +273,7 @@ public class PartitionedRegionHADUnitTest extends PartitionedRegionDUnitTestCase for (int k = 0; k < 10; k++) { pr.put(j + PR_PREFIX + k, PR_PREFIX + k); } - LogWriterSupport.getLogWriter().info("VM0 Done put successfully for PR = " + PR_PREFIX + LogWriterUtils.getLogWriter().info("VM0 Done put successfully for PR = " + PR_PREFIX + j); } } @@ -290,7 +290,7 @@ public class PartitionedRegionHADUnitTest extends PartitionedRegionDUnitTestCase for (int k = 10; k < 20; k++) { pr.put(j + PR_PREFIX + k, PR_PREFIX + k); } - LogWriterSupport.getLogWriter().info("VM1 Done put successfully for PR = " + PR_PREFIX + LogWriterUtils.getLogWriter().info("VM1 Done put successfully for PR = " + PR_PREFIX + j); } } @@ -299,7 +299,7 @@ public class PartitionedRegionHADUnitTest extends PartitionedRegionDUnitTestCase // dataStore1.invoke(addExpectedExceptions); AsyncInvocation async0 = dataStore0.invokeAsync(dataStore0Puts); // AsyncInvocation async1 = dataStore1.invokeAsync(dataStore1Puts); - Threads.join(async0, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async0, 30 * 1000); // async1.join(); dataStore0.invoke(removeExpectedExceptions); // dataStore1.invoke(removeExpectedExceptions); @@ -319,7 +319,7 @@ public class PartitionedRegionHADUnitTest extends PartitionedRegionDUnitTestCase async0 = dataStore0.invokeAsync(dataStore0Puts); // async1 = dataStore1.invokeAsync(dataStore1Puts); - Threads.join(async0, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async0, 30 * 1000); // async1.join(); if (async0.exceptionOccurred()) { @@ -380,7 +380,7 @@ public class PartitionedRegionHADUnitTest extends PartitionedRegionDUnitTestCase // This accessor should NOT have picked up any buckets. assertFalse(vm3LBRsize != 0); int vm2B2Nsize = ((Integer)dataStore2.invoke(validateBucketsOnNode)).intValue(); - LogWriterSupport.getLogWriter().info("vm2B2Nsize = " + vm2B2Nsize); + LogWriterUtils.getLogWriter().info("vm2B2Nsize = " + vm2B2Nsize); assertEquals(vm2B2Nsize, vm2LBRsize); } }
