http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java index da155f1..a734a10 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java @@ -26,8 +26,8 @@ import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.cache.client.internal.PoolImpl; import com.gemstone.gemfire.distributed.internal.DistributionConfig; 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; @@ -63,7 +63,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { final VM vm = Host.getHost(0).getVM(whichVM); vm.invoke(new CacheSerializableRunnable("Create bridge server") { public void run2() throws CacheException { - LogWriterSupport.getLogWriter().info("[testBug35381] Create BridgeServer"); + LogWriterUtils.getLogWriter().info("[testBug35381] Create BridgeServer"); getSystem(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); @@ -76,21 +76,21 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { bridgeServerPort = startBridgeServer(0); } catch (IOException e) { - LogWriterSupport.getLogWriter().error("startBridgeServer threw IOException", e); + LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e); fail("startBridgeServer threw IOException " + e.getMessage()); } assertTrue(bridgeServerPort != 0); - LogWriterSupport.getLogWriter().info("[testBug35381] port=" + bridgeServerPort); - LogWriterSupport.getLogWriter().info("[testBug35381] serverMemberId=" + getMemberId()); + LogWriterUtils.getLogWriter().info("[testBug35381] port=" + bridgeServerPort); + LogWriterUtils.getLogWriter().info("[testBug35381] serverMemberId=" + getMemberId()); } }); ports[whichVM] = vm.invokeInt(ClientRegisterInterestDUnitTest.class, "getBridgeServerPort"); assertTrue(ports[whichVM] != 0); - LogWriterSupport.getLogWriter().info("[testBug35381] create bridge client"); + LogWriterUtils.getLogWriter().info("[testBug35381] create bridge client"); Properties config = new Properties(); config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); config.setProperty(DistributionConfig.LOCATORS_NAME, ""); @@ -100,9 +100,9 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); - LogWriterSupport.getLogWriter().info("[testBug35381] creating connection pool"); + LogWriterUtils.getLogWriter().info("[testBug35381] creating connection pool"); boolean establishCallbackConnection = false; // SOURCE OF BUG 35381 - ClientServerTestCase.configureConnectionPool(factory, NetworkSupport.getServerHostName(host), ports, establishCallbackConnection, -1, -1, null); + ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, establishCallbackConnection, -1, -1, null); Region region = createRegion(name, factory.create()); assertNotNull(getRootRegion().getSubregion(name)); try { @@ -148,7 +148,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { final VM firstServerVM = Host.getHost(0).getVM(firstServerIdx); firstServerVM.invoke(new CacheSerializableRunnable("Create first bridge server") { public void run2() throws CacheException { - LogWriterSupport.getLogWriter().info("[testRegisterInterestFailover] Create first bridge server"); + LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] Create first bridge server"); getSystem(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); @@ -163,15 +163,15 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { bridgeServerPort = startBridgeServer(0); } catch (IOException e) { - LogWriterSupport.getLogWriter().error("startBridgeServer threw IOException", e); + LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e); fail("startBridgeServer threw IOException " + e.getMessage()); } assertTrue(bridgeServerPort != 0); - LogWriterSupport.getLogWriter().info("[testRegisterInterestFailover] " + + LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] " + "firstServer port=" + bridgeServerPort); - LogWriterSupport.getLogWriter().info("[testRegisterInterestFailover] " + + LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] " + "firstServer memberId=" + getMemberId()); } }); @@ -181,7 +181,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { final VM secondServerVM = Host.getHost(0).getVM(secondServerIdx); secondServerVM.invoke(new CacheSerializableRunnable("Create second bridge server") { public void run2() throws CacheException { - LogWriterSupport.getLogWriter().info("[testRegisterInterestFailover] Create second bridge server"); + LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] Create second bridge server"); getSystem(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); @@ -194,15 +194,15 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { bridgeServerPort = startBridgeServer(0); } catch (IOException e) { - LogWriterSupport.getLogWriter().error("startBridgeServer threw IOException", e); + LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e); fail("startBridgeServer threw IOException " + e.getMessage()); } assertTrue(bridgeServerPort != 0); - LogWriterSupport.getLogWriter().info("[testRegisterInterestFailover] " + + LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] " + "secondServer port=" + bridgeServerPort); - LogWriterSupport.getLogWriter().info("[testRegisterInterestFailover] " + + LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] " + "secondServer memberId=" + getMemberId()); } }); @@ -224,7 +224,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { }); // create the bridge client - LogWriterSupport.getLogWriter().info("[testBug35654] create bridge client"); + LogWriterUtils.getLogWriter().info("[testBug35654] create bridge client"); Properties config = new Properties(); config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); config.setProperty(DistributionConfig.LOCATORS_NAME, ""); @@ -234,9 +234,9 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); - LogWriterSupport.getLogWriter().info("[testRegisterInterestFailover] creating connection pool"); + LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] creating connection pool"); boolean establishCallbackConnection = true; - final PoolImpl p = (PoolImpl)ClientServerTestCase.configureConnectionPool(factory, NetworkSupport.getServerHostName(host), ports, establishCallbackConnection, -1, -1, null); + final PoolImpl p = (PoolImpl)ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, establishCallbackConnection, -1, -1, null); final Region region1 = createRootRegion(regionName1, factory.create()); final Region region2 = createRootRegion(regionName2, factory.create()); @@ -311,7 +311,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase { startBridgeServer(ports[secondServerIdx]); } catch (IOException e) { - LogWriterSupport.getLogWriter().error("startBridgeServer threw IOException", e); + LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e); fail("startBridgeServer threw IOException " + e.getMessage()); } }
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java index 7fdd975..fb319b6 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java @@ -46,8 +46,8 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier; import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy; 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.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -156,19 +156,19 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { createEntries(vm0); destroyEntries(vm0); - LogWriterSupport.getLogWriter().info("***************** register interest on all keys"); + LogWriterUtils.getLogWriter().info("***************** register interest on all keys"); createClientRegion(vm2, name, port, true); registerInterest(vm2); ensureAllTombstonesPresent(vm2); - LogWriterSupport.getLogWriter().info("***************** clear cache and register interest on one key, Object0"); + LogWriterUtils.getLogWriter().info("***************** clear cache and register interest on one key, Object0"); clearLocalCache(vm2); registerInterestOneKey(vm2, "Object0"); List<String> keys = new ArrayList(1); keys.add("Object0"); ensureAllTombstonesPresent(vm2, keys); - LogWriterSupport.getLogWriter().info("***************** clear cache and register interest on four keys"); + LogWriterUtils.getLogWriter().info("***************** clear cache and register interest on four keys"); clearLocalCache(vm2); keys = new ArrayList(4); for (int i=0; i<4; i++) { @@ -177,12 +177,12 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { registerInterest(vm2, keys); ensureAllTombstonesPresent(vm2, keys); - LogWriterSupport.getLogWriter().info("***************** clear cache and register interest with regex on four keys"); + LogWriterUtils.getLogWriter().info("***************** clear cache and register interest with regex on four keys"); clearLocalCache(vm2); registerInterestRegex(vm2, "Object[0-3]"); ensureAllTombstonesPresent(vm2, keys); - LogWriterSupport.getLogWriter().info("***************** fetch entries with getAll()"); + LogWriterUtils.getLogWriter().info("***************** fetch entries with getAll()"); clearLocalCache(vm2); getAll(vm2); ensureAllTombstonesPresent(vm2); @@ -209,19 +209,19 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { createEntries(vm0); invalidateEntries(vm0); - LogWriterSupport.getLogWriter().info("***************** register interest on all keys"); + LogWriterUtils.getLogWriter().info("***************** register interest on all keys"); createClientRegion(vm2, name, port, true); registerInterest(vm2); ensureAllInvalidsPresent(vm2); - LogWriterSupport.getLogWriter().info("***************** clear cache and register interest on one key, Object0"); + LogWriterUtils.getLogWriter().info("***************** clear cache and register interest on one key, Object0"); clearLocalCache(vm2); registerInterestOneKey(vm2, "Object0"); List<String> keys = new ArrayList(1); keys.add("Object0"); ensureAllInvalidsPresent(vm2, keys); - LogWriterSupport.getLogWriter().info("***************** clear cache and register interest on four keys"); + LogWriterUtils.getLogWriter().info("***************** clear cache and register interest on four keys"); clearLocalCache(vm2); keys = new ArrayList(4); for (int i=0; i<4; i++) { @@ -230,12 +230,12 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { registerInterest(vm2, keys); ensureAllInvalidsPresent(vm2, keys); - LogWriterSupport.getLogWriter().info("***************** clear cache and register interest with regex on four keys"); + LogWriterUtils.getLogWriter().info("***************** clear cache and register interest with regex on four keys"); clearLocalCache(vm2); registerInterestRegex(vm2, "Object[0-3]"); ensureAllInvalidsPresent(vm2, keys); - LogWriterSupport.getLogWriter().info("***************** fetch entries with getAll()"); + LogWriterUtils.getLogWriter().info("***************** fetch entries with getAll()"); clearLocalCache(vm2); getAll(vm2); ensureAllInvalidsPresent(vm2); @@ -482,8 +482,8 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { @Override public boolean done() { - LogWriterSupport.getLogWriter().info("tombstone count = " + TestRegion.getTombstoneCount()); - LogWriterSupport.getLogWriter().info("region size = " + TestRegion.size()); + LogWriterUtils.getLogWriter().info("tombstone count = " + TestRegion.getTombstoneCount()); + LogWriterUtils.getLogWriter().info("region size = " + TestRegion.size()); return TestRegion.getTombstoneCount() == 0 && TestRegion.size() == 0; } @@ -518,7 +518,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { // if (first) { // ((LocalRegion)proxy.getHARegion()).dumpBackingMap(); // } - LogWriterSupport.getLogWriter().info("queue size ("+size+") is still > 0 for " + proxy.getProxyID()); + LogWriterUtils.getLogWriter().info("queue size ("+size+") is still > 0 for " + proxy.getProxyID()); return false; } } @@ -526,7 +526,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { // also ensure that server regions have been cleaned up int regionEntryCount = TestRegion.getRegionMap().size(); if (regionEntryCount > 0) { - LogWriterSupport.getLogWriter().info("TestRegion has unexpected entries - all should have been GC'd but we have " + regionEntryCount); + LogWriterUtils.getLogWriter().info("TestRegion has unexpected entries - all should have been GC'd but we have " + regionEntryCount); TestRegion.dumpBackingMap(); return false; } @@ -549,7 +549,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { vm.invoke(new SerializableCallable("check that GC did not happen") { public Object call() throws Exception { if (TestRegion.getTombstoneCount() == 0) { - LogWriterSupport.getLogWriter().warning("region has no tombstones"); + LogWriterUtils.getLogWriter().warning("region has no tombstones"); // TestRegion.dumpBackingMap(); throw new AssertionFailedError("expected to find tombstones but region is empty"); } @@ -590,9 +590,9 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { SerializableCallable createRegion = new SerializableCallable() { public Object call() throws Exception { ClientCacheFactory cf = new ClientCacheFactory(); - cf.addPoolServer(NetworkSupport.getServerHostName(vm.getHost()), port); + cf.addPoolServer(NetworkUtils.getServerHostName(vm.getHost()), port); cf.setPoolSubscriptionEnabled(true); - cf.set("log-level", LogWriterSupport.getDUnitLogLevel()); + cf.set("log-level", LogWriterUtils.getDUnitLogLevel()); ClientCache cache = getClientCache(cf); ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY); crf.setConcurrencyChecksEnabled(ccEnabled); @@ -611,14 +611,14 @@ public class ClientServerCCEDUnitTest extends CacheTestCase { SerializableCallable createRegion = new SerializableCallable() { public Object call() throws Exception { ClientCacheFactory cf = new ClientCacheFactory(); - cf.addPoolServer(NetworkSupport.getServerHostName(vm.getHost()), port1); - cf.addPoolServer(NetworkSupport.getServerHostName(vm.getHost()), port2); + cf.addPoolServer(NetworkUtils.getServerHostName(vm.getHost()), port1); + cf.addPoolServer(NetworkUtils.getServerHostName(vm.getHost()), port2); cf.setPoolSubscriptionEnabled(true); cf.setPoolSubscriptionRedundancy(1); // bug #50683 - secondary durable queue retains all GC messages cf.set("durable-client-id", ""+vm.getPid()); cf.set("durable-client-timeout", "" + 200); - cf.set("log-level", LogWriterSupport.getDUnitLogLevel()); + cf.set("log-level", LogWriterUtils.getDUnitLogLevel()); ClientCache cache = getClientCache(cf); ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY); crf.setConcurrencyChecksEnabled(ccEnabled); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java index c3c0a8c..5c2f8a2 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java @@ -35,7 +35,7 @@ import com.gemstone.gemfire.distributed.DistributedMember; import com.gemstone.gemfire.distributed.DistributedSystem; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; import com.gemstone.gemfire.internal.AvailablePortHelper; -import com.gemstone.gemfire.test.dunit.DistributedTestSupport; +import com.gemstone.gemfire.test.dunit.DistributedTestUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -208,7 +208,7 @@ public class ClientServerTestCase extends CacheTestCase { boolean threadLocalCnxs, int lifetimeTimeout, int statisticInterval) { if(AUTO_LOAD_BALANCE) { - pf.addLocator(host,DistributedTestSupport.getDUnitLocatorPort()); + pf.addLocator(host,DistributedTestUtils.getDUnitLocatorPort()); } else { for(int z=0;z<ports.length;z++) { pf.addServer(host,ports[z]); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java index f283bb8..c2f06c1 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java @@ -26,7 +26,7 @@ import com.gemstone.gemfire.internal.cache.InitialImageOperation; import com.gemstone.gemfire.internal.cache.InitialImageOperation.GIITestHook; import com.gemstone.gemfire.internal.cache.InitialImageOperation.GIITestHookType; 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; @@ -157,7 +157,7 @@ public class ConcurrentLeaveDuringGIIDUnitTest extends CacheTestCase { // ensure that the RVV has recorded the event DistributedRegion r = (DistributedRegion)getCache().getRegion(regionName); if (!r.getVersionVector().contains(Xid, 1)) { - LogWriterSupport.getLogWriter().info("r's version vector is " + r.getVersionVector().fullToString()); + LogWriterUtils.getLogWriter().info("r's version vector is " + r.getVersionVector().fullToString()); ((LocalRegion)r).dumpBackingMap(); } assertTrue(r.containsKey("keyFromX")); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java index 84b9385..817943a 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java @@ -48,7 +48,7 @@ import com.gemstone.gemfire.internal.cache.LocalRegion; import com.gemstone.gemfire.internal.cache.lru.LRUCapacityController; import com.gemstone.gemfire.internal.cache.lru.LRUStatistics; 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; @@ -143,7 +143,7 @@ public class DiskRegionDUnitTest extends CacheTestCase { flush(region); - LogWriterSupport.getLogWriter().info("DEBUG: writes=" + diskStats.getWrites() + LogWriterUtils.getLogWriter().info("DEBUG: writes=" + diskStats.getWrites() + " reads=" + diskStats.getReads() + " evictions=" + lruStats.getEvictions() + " total=" + total @@ -162,7 +162,7 @@ public class DiskRegionDUnitTest extends CacheTestCase { assertNotNull(value); assertEquals(0, ((int[]) value)[0]); - LogWriterSupport.getLogWriter().info("DEBUG: writes=" + diskStats.getWrites() + LogWriterUtils.getLogWriter().info("DEBUG: writes=" + diskStats.getWrites() + " reads=" + diskStats.getReads() + " evictions=" + lruStats.getEvictions() + " total=" + total @@ -374,7 +374,7 @@ public class DiskRegionDUnitTest extends CacheTestCase { // DiskRegion dr = region.getDiskRegion(); LRUStatistics lruStats = getLRUStats(region); for (int i = 0; lruStats.getEvictions() < 10; i++) { - LogWriterSupport.getLogWriter().info("Put " + i); + LogWriterUtils.getLogWriter().info("Put " + i); region.put(new Integer(i), new byte[1]); } @@ -435,7 +435,7 @@ public class DiskRegionDUnitTest extends CacheTestCase { long evictions = lruStats.getEvictions(); - LogWriterSupport.getLogWriter().info("Destroying memory resident entries"); + LogWriterUtils.getLogWriter().info("Destroying memory resident entries"); // Destroying each of these guys should have no effect on the disk for (int i = total - 1; i >= evictions; i--) { region.destroy(new Integer(i)); @@ -446,7 +446,7 @@ public class DiskRegionDUnitTest extends CacheTestCase { // long startRemoves = diskStats.getRemoves(); - LogWriterSupport.getLogWriter().info("Destroying disk-resident entries. evictions=" + evictions); + LogWriterUtils.getLogWriter().info("Destroying disk-resident entries. evictions=" + evictions); // Destroying each of these guys should cause a removal from disk for (int i = ((int) evictions) - 1; i >= 0; i--) { @@ -458,7 +458,7 @@ public class DiskRegionDUnitTest extends CacheTestCase { assertEquals(evictions, lruStats.getEvictions()); - LogWriterSupport.getLogWriter().info("keys remaining in region: " + region.keys().size()); + LogWriterUtils.getLogWriter().info("keys remaining in region: " + region.keys().size()); assertEquals(0, region.keys().size()); } @@ -970,7 +970,7 @@ public class DiskRegionDUnitTest extends CacheTestCase { // DiskRegion dr = region.getDiskRegion(); LRUStatistics lruStats = getLRUStats(region); for (int i = 0; lruStats.getEvictions() < 10; i++) { - LogWriterSupport.getLogWriter().info("Put " + i); + LogWriterUtils.getLogWriter().info("Put " + i); region.put(new Integer(i), new byte[1]); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java index 10abe4e..98b997d 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java @@ -44,7 +44,7 @@ import com.gemstone.gemfire.distributed.DistributedSystem; import com.gemstone.gemfire.test.dunit.DistributedTestCase; 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.VM; @@ -199,8 +199,8 @@ public class DistAckMapMethodsDUnitTest extends DistributedTestCase{ vm0.invoke(DistAckMapMethodsDUnitTest.class, "putMethod", objArr); obj1 = vm1.invoke(DistAckMapMethodsDUnitTest.class, "getMethod", objArr);//to make sure that vm1 region has the entry obj2 = vm1.invoke(DistAckMapMethodsDUnitTest.class, "removeMethod", objArr); - LogWriterSupport.getLogWriter().fine("111111111"+obj1); - LogWriterSupport.getLogWriter().fine("2222222222"+obj2); + LogWriterUtils.getLogWriter().fine("111111111"+obj1); + LogWriterUtils.getLogWriter().fine("2222222222"+obj2); if (obj1 == null) fail("region1.getMethod returned null"); if(!(obj1.equals(obj2))){ http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java index 93ffa43..f957e49 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java @@ -27,7 +27,7 @@ import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.distributed.internal.DistributionConfig; 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.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -62,7 +62,7 @@ public class DistributedAckRegionDUnitTest extends MultiVMRegionTestCase { public Properties getDistributedSystemProperties() { Properties p = new Properties(); p.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true"); - p.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + p.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); return p; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java index 0036cf3..a1cc2cd 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.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.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.VM; import com.gemstone.gemfire.test.dunit.Wait; @@ -174,25 +174,25 @@ public class DistributedNoAckRegionCCEDUnitTest extends if (event.isOriginRemote()) { synchronized(this) { while (ListenerBlocking) { - LogWriterSupport.getLogWriter().info("blocking cache operations for " + event.getDistributedMember()); + LogWriterUtils.getLogWriter().info("blocking cache operations for " + event.getDistributedMember()); blocked = true; try { wait(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); - LogWriterSupport.getLogWriter().info("blocking cache listener interrupted"); + LogWriterUtils.getLogWriter().info("blocking cache listener interrupted"); return; } } } if (blocked) { - LogWriterSupport.getLogWriter().info("allowing cache operations for " + event.getDistributedMember()); + LogWriterUtils.getLogWriter().info("allowing cache operations for " + event.getDistributedMember()); } } } @Override public void close() { - LogWriterSupport.getLogWriter().info("closing blocking listener"); + LogWriterUtils.getLogWriter().info("closing blocking listener"); ListenerBlocking = false; synchronized(this) { notifyAll(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java index adf0ba9..1d680f0 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java @@ -31,9 +31,9 @@ import com.gemstone.gemfire.internal.cache.StateFlushOperation; 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; @@ -184,12 +184,12 @@ public class DistributedNoAckRegionDUnitTest SerializableRunnable create = new CacheSerializableRunnable("Create Mirrored Region") { public void run2() throws CacheException { - LogWriterSupport.getLogWriter().info("testBug30705: Start creating Mirrored Region"); + LogWriterUtils.getLogWriter().info("testBug30705: Start creating Mirrored Region"); AttributesFactory factory = new AttributesFactory(getRegionAttributes()); factory.setDataPolicy(DataPolicy.REPLICATE); createRegion(name, factory.create()); - LogWriterSupport.getLogWriter().info("testBug30705: Finished creating Mirrored Region"); + LogWriterUtils.getLogWriter().info("testBug30705: Finished creating Mirrored Region"); } }; @@ -201,14 +201,14 @@ public class DistributedNoAckRegionDUnitTest Object key = new Integer(0x42); Object value = new byte[0]; assertNotNull(value); - LogWriterSupport.getLogWriter().info("testBug30705: Started Distributed NoAck Puts"); + LogWriterUtils.getLogWriter().info("testBug30705: Started Distributed NoAck Puts"); for (int i = 0; i < NUM_PUTS; i++) { if (stopPutting) { - LogWriterSupport.getLogWriter().info("testBug30705: Interrupted Distributed Ack Puts after " + i + " PUTS"); + LogWriterUtils.getLogWriter().info("testBug30705: Interrupted Distributed Ack Puts after " + i + " PUTS"); break; } if ((i % 1000) == 0) { - LogWriterSupport.getLogWriter().info("testBug30705: modification #" + i); + LogWriterUtils.getLogWriter().info("testBug30705: modification #" + i); } rgn.put(key, value); } @@ -220,18 +220,18 @@ public class DistributedNoAckRegionDUnitTest vm0.invoke(new CacheSerializableRunnable("Put data") { public void run2() throws CacheException { - LogWriterSupport.getLogWriter().info("testBug30705: starting initial data load"); + LogWriterUtils.getLogWriter().info("testBug30705: starting initial data load"); Region region = getRootRegion().getSubregion(name); final byte[] value = new byte[valueSize]; Arrays.fill(value, (byte)0x42); for (int i = 0; i < numEntries; i++) { if ((i % 1000) == 0) { - LogWriterSupport.getLogWriter().info("testBug30705: initial put #" + i); + LogWriterUtils.getLogWriter().info("testBug30705: initial put #" + i); } region.put(new Integer(i), value); } - LogWriterSupport.getLogWriter().info("testBug30705: finished initial data load"); + LogWriterUtils.getLogWriter().info("testBug30705: finished initial data load"); } }); @@ -240,19 +240,19 @@ public class DistributedNoAckRegionDUnitTest // do initial image try { - LogWriterSupport.getLogWriter().info("testBug30705: before the critical create"); + LogWriterUtils.getLogWriter().info("testBug30705: before the critical create"); vm2.invoke(create); - LogWriterSupport.getLogWriter().info("testBug30705: after the critical create"); + LogWriterUtils.getLogWriter().info("testBug30705: after the critical create"); } finally { // test passes if this does not hang - LogWriterSupport.getLogWriter().info("testBug30705: INTERRUPTING Distributed NoAck Puts after GetInitialImage"); + LogWriterUtils.getLogWriter().info("testBug30705: INTERRUPTING Distributed NoAck Puts after GetInitialImage"); vm0.invoke(new SerializableRunnable("Interrupt Puts") { public void run() { - LogWriterSupport.getLogWriter().info("testBug30705: interrupting putter"); + LogWriterUtils.getLogWriter().info("testBug30705: interrupting putter"); stopPutting = true; } }); - Threads.join(async, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); // wait for overflow queue to quiesce before continuing vm2.invoke(new SerializableRunnable("Wait for Overflow Queue") { public void run() { @@ -274,7 +274,7 @@ public class DistributedNoAckRegionDUnitTest } }); } // finally - LogWriterSupport.getLogWriter().info("testBug30705: at end of test"); + LogWriterUtils.getLogWriter().info("testBug30705: at end of test"); if (async.exceptionOccurred()) { Assert.fail("Got exception", async.getException()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DynamicRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DynamicRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DynamicRegionDUnitTest.java index c507437..3d62b31 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DynamicRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DynamicRegionDUnitTest.java @@ -32,7 +32,7 @@ import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.internal.OSProcess; import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation; 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; /** @@ -74,7 +74,7 @@ public class DynamicRegionDUnitTest extends CacheTestCase { */ @Override protected final void preTearDownCacheTestCase() throws Exception { - LogWriterSupport.getLogWriter().info("Running tearDown in " + this); + LogWriterUtils.getLogWriter().info("Running tearDown in " + this); try { //Asif destroy dynamic regions at the end of the test CacheSerializableRunnable destroyDynRegn = new CacheSerializableRunnable("Destroy Dynamic regions") { @@ -98,7 +98,7 @@ public class DynamicRegionDUnitTest extends CacheTestCase { throw e; } catch (Throwable t) { - LogWriterSupport.getLogWriter().severe("tearDown in " + this + " failed due to " + t); + LogWriterUtils.getLogWriter().severe("tearDown in " + this + " failed due to " + t); } finally { try { @@ -109,11 +109,11 @@ public class DynamicRegionDUnitTest extends CacheTestCase { throw e; } catch (Throwable t) { - LogWriterSupport.getLogWriter().severe("tearDown in " + this + " failed to disconnect all DS due to " + t); + LogWriterUtils.getLogWriter().severe("tearDown in " + this + " failed to disconnect all DS due to " + t); } } if (! DynamicRegionFactory.get().isClosed()) { - LogWriterSupport.getLogWriter().severe("DynamicRegionFactory not closed!", new Exception()); + LogWriterUtils.getLogWriter().severe("DynamicRegionFactory not closed!", new Exception()); } } @@ -231,7 +231,7 @@ public class DynamicRegionDUnitTest extends CacheTestCase { DynamicRegionFactory.get().createDynamicRegion(drFullPath, "subregion" + i); } - LogWriterSupport.getLogWriter().info("testPeerRegion - check #1 make sure other region has new dynamic subregion"); + LogWriterUtils.getLogWriter().info("testPeerRegion - check #1 make sure other region has new dynamic subregion"); checkForRegionOtherVm(drFullPath, true); // spot check the subregions @@ -240,13 +240,13 @@ public class DynamicRegionDUnitTest extends CacheTestCase { // now see if OTHER can recreate which should fetch meta-info from controller recreateOtherVm(); - LogWriterSupport.getLogWriter().info("testPeerRegion - check #2 make sure other region has dynamic region after restarting through getInitialImage"); + LogWriterUtils.getLogWriter().info("testPeerRegion - check #2 make sure other region has dynamic region after restarting through getInitialImage"); checkForRegionOtherVm(drFullPath, true); // now close the controller and see if OTHER can still fetch meta-info from disk closeCache(); recreateOtherVm(); - LogWriterSupport.getLogWriter().info("testPeerRegion - check #3 make sure dynamic region can be recovered from disk"); + LogWriterUtils.getLogWriter().info("testPeerRegion - check #3 make sure dynamic region can be recovered from disk"); checkForRegionOtherVm(drFullPath, true); for (int i=0; i<10; i++) { checkForSubregionOtherVm(drFullPath + "/subregion" + i, true); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalLockingDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalLockingDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalLockingDUnitTest.java index a1d3ea9..0830b7e 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalLockingDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalLockingDUnitTest.java @@ -29,7 +29,7 @@ import com.gemstone.gemfire.cache.RegionExistsException; import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.cache.TimeoutException; 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; /** @@ -72,13 +72,13 @@ public class GlobalLockingDUnitTest extends CacheTestCase { * Tests for 32356 R2 tryLock w/ 0 timeout broken in Distributed Lock Service */ public void testBug32356() throws Exception { - LogWriterSupport.getLogWriter().fine("[testBug32356]"); + LogWriterUtils.getLogWriter().fine("[testBug32356]"); Host host = Host.getHost(0); final String name = this.getUniqueName(); final Object key = "32356"; // lock/unlock '32356' in all vms... (make all vms aware of token) - LogWriterSupport.getLogWriter().fine("[testBug32356] lock/unlock '32356' in all vms"); + LogWriterUtils.getLogWriter().fine("[testBug32356] lock/unlock '32356' in all vms"); for (int i = 0; i < 4; i++) { final int vm = i; host.getVM(vm).invoke(new CacheSerializableRunnable("testBug32356_step1") { @@ -93,7 +93,7 @@ public class GlobalLockingDUnitTest extends CacheTestCase { } // attempt try-lock of zero wait time in all vms - LogWriterSupport.getLogWriter().fine("[testBug32356] attempt try-lock of zero wait time in all vms"); + LogWriterUtils.getLogWriter().fine("[testBug32356] attempt try-lock of zero wait time in all vms"); for (int i = 0; i < 4; i++) { final int vm = i; host.getVM(vm).invoke(new CacheSerializableRunnable("testBug32356_step2") { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionDUnitTest.java index 8b7dc98..008f951 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionDUnitTest.java @@ -34,9 +34,9 @@ import com.gemstone.gemfire.cache.TimeoutException; 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; /** @@ -256,7 +256,7 @@ public class GlobalRegionDUnitTest extends MultiVMRegionTestCase { Thread thread = new Thread(group, new Runnable() { public void run() { try { - LogWriterSupport.getLogWriter().info("testSynchronousIncrements." + this); + LogWriterUtils.getLogWriter().info("testSynchronousIncrements." + this); final Random rand = new Random(System.identityHashCode(this)); try { Region region = getRootRegion().getSubregion(name); @@ -280,7 +280,7 @@ public class GlobalRegionDUnitTest extends MultiVMRegionTestCase { region.put(key, value); assertEquals(value, region.get(key)); - LogWriterSupport.getLogWriter().info("testSynchronousIncrements." + + LogWriterUtils.getLogWriter().info("testSynchronousIncrements." + this + ": " + key + " -> " + value); lock.unlock(); } @@ -296,7 +296,7 @@ public class GlobalRegionDUnitTest extends MultiVMRegionTestCase { throw e; } catch (Throwable t) { - LogWriterSupport.getLogWriter().info("testSynchronousIncrements." + + LogWriterUtils.getLogWriter().info("testSynchronousIncrements." + this + " caught Throwable", t); } } @@ -306,7 +306,7 @@ public class GlobalRegionDUnitTest extends MultiVMRegionTestCase { } for (int i = 0; i < threads.length; i++) { - Threads.join(threads[i], 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(threads[i], 30 * 1000); } } }; @@ -317,7 +317,7 @@ public class GlobalRegionDUnitTest extends MultiVMRegionTestCase { } for (int i = 0; i < vmCount; i++) { - Threads.join(invokes[i], 5 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(invokes[i], 5 * 60 * 1000); if (invokes[i].exceptionOccurred()) { Assert.fail("invocation failed", invokes[i].getException()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/LRUEvictionControllerDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/LRUEvictionControllerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/LRUEvictionControllerDUnitTest.java index 1246077..b3a85bc 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/LRUEvictionControllerDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/LRUEvictionControllerDUnitTest.java @@ -46,7 +46,7 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.Resou import com.gemstone.gemfire.internal.cache.lru.HeapEvictor; import com.gemstone.gemfire.internal.cache.lru.LRUStatistics; 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; /** @@ -304,7 +304,7 @@ public class LRUEvictionControllerDUnitTest extends CacheTestCase { CacheListenerAdapter() { public void afterCreate(EntryEvent event) { try { - LogWriterSupport.getLogWriter().info("AFTER CREATE"); + LogWriterUtils.getLogWriter().info("AFTER CREATE"); region.put(key, value2); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java index 9a29df0..d3b065c 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java @@ -114,12 +114,12 @@ import com.gemstone.gemfire.internal.offheap.MemoryChunkWithRefCount; import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl; import com.gemstone.gemfire.test.dunit.AsyncInvocation; 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.RMIException; 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; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -462,7 +462,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { Object value = e.getNewValue(); assertNotNull(value); try { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("++ Adding " + value); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("++ Adding " + value); queue.put(value); } catch (InterruptedException ex) { @@ -482,9 +482,9 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { (LinkedBlockingQueue) region.getUserAttribute(); for (int i = 0; i <= lastNumber; i++) { try { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("++ Waiting for " + i); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("++ Waiting for " + i); Integer value = (Integer) queue.take(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("++ Got " + value); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("++ Got " + value); assertEquals(i, value.intValue()); } catch (InterruptedException ex) { @@ -506,8 +506,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } }); - Threads.join(ai0, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); - Threads.join(ai1, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(ai0, 30 * 1000); + ThreadUtils.join(ai1, 30 * 1000); if (ai0.exceptionOccurred()) { com.gemstone.gemfire.test.dunit.Assert.fail("ai0 failed", ai0.getException()); @@ -983,7 +983,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { // changed from severe to fine because it is possible // for this to return non-null on d-no-ack // that is was invokeRepeatingIfNecessary is called - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().fine("invalidated entry has value of " + entry.getValue()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().fine("invalidated entry has value of " + entry.getValue()); } assertNull(entry.getValue()); } @@ -3316,7 +3316,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { assertTrue(index >= 0); assertEquals(expectedValues.remove(index), event.getNewValue()); expectedKeys.remove(index); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("afterCreate called in " + + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("afterCreate called in " + "MirroredDataFromNonMirroredListener for key:" + event.getKey()); } } @@ -3437,7 +3437,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { Region.Entry entry1 = region.getEntry(key1); if (!getRegionAttributes().getDataPolicy().withReplication()) { if (entry1 != null) { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("found entry " + entry1); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("found entry " + entry1); } assertNull(entry1); } @@ -4291,7 +4291,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { factory.setScope(Scope.DISTRIBUTED_ACK); factory.setDataPolicy(DataPolicy.NORMAL); factory.setSubscriptionAttributes(new SubscriptionAttributes(InterestPolicy.ALL)); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("MJT DEBUG: attrs0 are " + factory.create()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("MJT DEBUG: attrs0 are " + factory.create()); createRootRegion(factory.create()); } { @@ -4301,7 +4301,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { if (getRegionAttributes().getDataPolicy() == DataPolicy.NORMAL) { factory.setDataPolicy(DataPolicy.PRELOADED); } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("MJT DEBUG: attrs1 are " + factory.create()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("MJT DEBUG: attrs1 are " + factory.create()); Region region = createRegion(name, factory.create()); } finishCacheXml(name); @@ -4380,7 +4380,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { // before the get initial image is complete. for (int i = 1; i < NB1_NUM_ENTRIES; i += 2) { Object key = new Integer(i); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Operation #"+i+" on key " + key); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Operation #"+i+" on key " + key); switch (i % 6) { case 1: // UPDATE // use the current timestamp so we know when it happened @@ -4438,28 +4438,28 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { }); } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Before GetInitialImage, data policy is "+getRegionAttributes().getDataPolicy()+", scope is "+getRegionAttributes().getScope()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Before GetInitialImage, data policy is "+getRegionAttributes().getDataPolicy()+", scope is "+getRegionAttributes().getScope()); AsyncInvocation asyncGII = vm2.invokeAsync(create); if (!getRegionAttributes().getScope().isGlobal()) { // wait for nonblocking operations to complete - Threads.join(async, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); vm2.invoke(new SerializableRunnable("Set fast image processing") { public void run() { com.gemstone.gemfire.internal.cache.InitialImageOperation.slowImageProcessing = 0; } }); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("after async nonblocking ops complete"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("after async nonblocking ops complete"); } // wait for GII to complete - Threads.join(asyncGII, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncGII, 30 * 1000); final long iiComplete = System.currentTimeMillis(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Complete GetInitialImage at: " + System.currentTimeMillis()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Complete GetInitialImage at: " + System.currentTimeMillis()); if (getRegionAttributes().getScope().isGlobal()) { // wait for nonblocking operations to complete - Threads.join(async, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); } if (async.exceptionOccurred()) { com.gemstone.gemfire.test.dunit.Assert.fail("async failed", async.getException()); @@ -4477,7 +4477,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { region.localDestroyRegion(); } }); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("after localDestroyRegion"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("after localDestroyRegion"); // invoke repeating so noack regions wait for all updates to get processed vm2.invokeRepeatingIfNecessary(new CacheSerializableRunnable("Verify entryCount") { @@ -4500,7 +4500,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { if (entriesDumped) return; entriesDumped = true; - LogWriter logger = com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter(); + LogWriter logger = com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter(); logger.info("DUMPING Entries with values in VM that should have been destroyed:"); for (int i = 5; i < NB1_NUM_ENTRIES; i += 6) { try { @@ -4513,7 +4513,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } } }, 5000); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("after verify entryCount"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("after verify entryCount"); vm2.invoke(new CacheSerializableRunnable("Verify keys/values & Nonblocking") { @@ -4567,7 +4567,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } } } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": " + numConcurrent + " entries out of " + entryCount + + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": " + numConcurrent + " entries out of " + entryCount + " were updated concurrently with getInitialImage"); // make sure at least some of them were concurrent if (region.getAttributes().getScope().isGlobal()) { @@ -4583,7 +4583,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } } }); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("after verify key/values"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("after verify key/values"); } /** @@ -4773,23 +4773,23 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { if (!getRegionAttributes().getScope().isGlobal()) { // wait for nonblocking operations to complete - Threads.join(async, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); vm2.invoke(new SerializableRunnable("Set fast image processing") { public void run() { com.gemstone.gemfire.internal.cache.InitialImageOperation.slowImageProcessing = 0; } }); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("after async nonblocking ops complete"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("after async nonblocking ops complete"); } // wait for GII to complete - Threads.join(asyncGII, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncGII, 30 * 1000); final long iiComplete = System.currentTimeMillis(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Complete GetInitialImage at: " + System.currentTimeMillis()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Complete GetInitialImage at: " + System.currentTimeMillis()); if (getRegionAttributes().getScope().isGlobal()) { // wait for nonblocking operations to complete - Threads.join(async, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); } if (async.exceptionOccurred()) { @@ -4830,7 +4830,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { if (entriesDumped) return; entriesDumped = true; - LogWriter logger = com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter(); + LogWriter logger = com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter(); logger.info("DUMPING Entries with values in VM that should have been destroyed:"); for (int i = 5; i < NB1_NUM_ENTRIES; i += 6) { logger.info(i + "-->" + @@ -4891,7 +4891,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } } } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": " + numConcurrent + " entries out of " + entryCount + + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": " + numConcurrent + " entries out of " + entryCount + " were updated concurrently with getInitialImage"); // make sure at least some of them were concurrent { @@ -5086,7 +5086,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { if (!getRegionAttributes().getScope().isGlobal()) { // wait for nonblocking operations to complete try { - Threads.join(async, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); } finally { vm2.invoke(new SerializableRunnable("Set fast image processing") { public void run() { @@ -5094,16 +5094,16 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } }); } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("after async nonblocking ops complete"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("after async nonblocking ops complete"); } // wait for GII to complete - Threads.join(asyncGII, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(asyncGII, 30 * 1000); final long iiComplete = System.currentTimeMillis(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Complete GetInitialImage at: " + System.currentTimeMillis()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Complete GetInitialImage at: " + System.currentTimeMillis()); if (getRegionAttributes().getScope().isGlobal()) { // wait for nonblocking operations to complete - Threads.join(async, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); } if (asyncGII.exceptionOccurred()) { throw new Error("asyncGII failed", asyncGII.getException()); @@ -5144,7 +5144,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { if (entriesDumped) return; entriesDumped = true; - LogWriter logger = com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter(); + LogWriter logger = com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter(); logger.info("DUMPING Entries with values in VM that should have been destroyed:"); for (int i = 5; i < NB1_NUM_ENTRIES; i += 6) { logger.info(i + "-->" + @@ -5210,7 +5210,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } } } - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": " + numConcurrent + " entries out of " + entryCount + + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": " + numConcurrent + " entries out of " + entryCount + " were updated concurrently with getInitialImage"); // [sumedh] Occasionally fails. Do these assertions really make sense? @@ -5409,7 +5409,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { }); if (getRegionAttributes().getScope().isGlobal()) { // wait for nonblocking operations to complete - Threads.join(async, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); if (async.exceptionOccurred()) { com.gemstone.gemfire.test.dunit.Assert.fail("async invocation failed", async.getException()); } @@ -5419,16 +5419,16 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { com.gemstone.gemfire.internal.cache.InitialImageOperation.slowImageProcessing = 0; } }); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("after async nonblocking ops complete"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("after async nonblocking ops complete"); } // wait for GII to complete //getLogWriter().info("starting wait for GetInitialImage Completion"); - Threads.join(asyncGII, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Complete GetInitialImage at: " + System.currentTimeMillis()); + ThreadUtils.join(asyncGII, 30 * 1000); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Complete GetInitialImage at: " + System.currentTimeMillis()); if (getRegionAttributes().getScope().isGlobal()) { // wait for nonblocking operations to complete - Threads.join(async, 30 * 1000, com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter()); + ThreadUtils.join(async, 30 * 1000); } if (async.exceptionOccurred()) { com.gemstone.gemfire.test.dunit.Assert.fail("async failed", async.getException()); @@ -5465,10 +5465,10 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": before creates"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": before creates"); vm0.invoke(create); vm1.invoke(create); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after creates"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after creates"); final Object key = "KEY"; final Object key2 = "KEY2"; @@ -5481,7 +5481,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { disconnectFromDS(); } }); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after vm2 disconnect"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after vm2 disconnect"); try { vm0.invoke(new CacheSerializableRunnable("Put int") { @@ -5490,7 +5490,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { IntWrapper.IntWrapperSerializer serializer = (IntWrapper.IntWrapperSerializer) DataSerializer.register(c); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Registered serializer id:" + serializer.getId() + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Registered serializer id:" + serializer.getId() + " class:" + c.getName()); Region region = getRootRegion().getSubregion(name); @@ -5500,7 +5500,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { assertTrue(serializer.wasInvoked); } }); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after vm0 put"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after vm0 put"); SerializableRunnable get = new CacheSerializableRunnable("Get int") { public void run2() throws CacheException { @@ -5537,7 +5537,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } }; vm1.invoke(get); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after vm1 get"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after vm1 get"); // Make sure that VMs that connect after registration can get the // serializer @@ -5551,7 +5551,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } }); vm2.invoke(create); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after vm2 create"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after vm2 create"); vm2.invoke(new CacheSerializableRunnable("Put long") { public void run2() throws CacheException { Region region = getRootRegion().getSubregion(name); @@ -5565,9 +5565,9 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { assertTrue(serializer.wasInvoked); } }); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after vm2 put"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after vm2 put"); vm2.invoke(get); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after vm2 get"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after vm2 get"); SerializableRunnable get2 = new CacheSerializableRunnable("Get long") { public void run2() throws CacheException { @@ -5579,9 +5579,9 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } }; vm0.invoke(get2); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after vm0 get2"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after vm0 get2"); vm1.invoke(get2); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after vm1 get2"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after vm1 get2"); // wait a little while for other netsearch requests to return // before unregistering the serializers that will be needed to process these @@ -5589,7 +5589,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } finally { Wait.pause(1500); unregisterAllSerializers(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info(name + ": after unregister"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(name + ": after unregister"); } } @@ -5712,7 +5712,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { * system. */ private static void unregisterAllSerializers() { - DistributedTestSupport.unregisterAllDataSerializersFromAllVms(); + DistributedTestUtils.unregisterAllDataSerializersFromAllVms(); cleanupAllVms(); } @@ -8175,11 +8175,11 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { long start = System.currentTimeMillis(); RegionVersionVector vm0vv = getVersionVector(vm0); long end = System.currentTimeMillis(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("version vector transmission took " + (end-start) + " ms"); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("vm0 vector = " + vm0vv); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("version vector transmission took " + (end-start) + " ms"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("vm0 vector = " + vm0vv); - RegionVersionVector vm1vv = getVersionVector(vm1); com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("vm1 vector = " + vm1vv); - RegionVersionVector vm2vv = getVersionVector(vm2); com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("vm2 vector = " + vm2vv); + RegionVersionVector vm1vv = getVersionVector(vm1); com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("vm1 vector = " + vm1vv); + RegionVersionVector vm2vv = getVersionVector(vm2); com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("vm2 vector = " + vm2vv); Map<String, VersionTag> vm0Versions = (Map<String, VersionTag>)vm0.invoke(this.getClass(), "getCCRegionVersions"); Map<String, VersionTag> vm1Versions = (Map<String, VersionTag>)vm1.invoke(this.getClass(), "getCCRegionVersions"); @@ -8515,7 +8515,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { Wait.waitForCriterion(waitForExpiration, TombstoneService.REPLICATED_TOMBSTONE_TIMEOUT+10000, 1000, true); } catch (AssertionFailedError e) { CCRegion.dumpBackingMap(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("tombstone service state: " + CCRegion.getCache().getTombstoneService()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("tombstone service state: " + CCRegion.getCache().getTombstoneService()); throw e; } } @@ -8567,7 +8567,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { } } catch (AssertionFailedError e) { CCRegion.dumpBackingMap(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("tombstone service state: " + CCRegion.getCache().getTombstoneService()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("tombstone service state: " + CCRegion.getCache().getTombstoneService()); throw e; } catch (CacheException e) { com.gemstone.gemfire.test.dunit.Assert.fail("while performing create/destroy operations", e); @@ -8946,7 +8946,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { public void close() { } public Object load(LoaderHelper helper) throws CacheLoaderException { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("The test CacheLoader has been invoked for key '" + helper.getKey() + "'"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("The test CacheLoader has been invoked for key '" + helper.getKey() + "'"); return "loadedValue"; } }); @@ -9034,7 +9034,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { for (int i=0; i<100; i++) { RegionEntry entry = r.getRegionEntry("cckey"+i); int stamp = entry.getVersionStamp().getEntryVersion(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("checking key cckey" + i + " having version " + stamp + " entry=" + entry); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("checking key cckey" + i + " having version " + stamp + " entry=" + entry); assertEquals(2, stamp); assertEquals(result.get("cckey"+i), i+1); } @@ -9101,13 +9101,13 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase { public static byte[] getCCRegionVersionVector() throws Exception { Object id = getMemberId(); int vm = VM.getCurrentVMNum(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("vm" + vm + " with id " + id + " copying " + CCRegion.getVersionVector().fullToString()); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("vm" + vm + " with id " + id + " copying " + CCRegion.getVersionVector().fullToString()); RegionVersionVector vector = CCRegion.getVersionVector().getCloneForTransmission(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("clone is " + vector); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("clone is " + vector); HeapDataOutputStream dos = new HeapDataOutputStream(3000, Version.CURRENT); DataSerializer.writeObject(vector, dos); byte[] bytes = dos.toByteArray(); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("serialized size is " + bytes.length); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("serialized size is " + bytes.length); return bytes; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PRBucketSynchronizationDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PRBucketSynchronizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PRBucketSynchronizationDUnitTest.java index 52ac05a..a68bd46 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PRBucketSynchronizationDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PRBucketSynchronizationDUnitTest.java @@ -40,10 +40,10 @@ import com.gemstone.gemfire.internal.cache.VMCachedDeserializable; import com.gemstone.gemfire.internal.cache.versions.VMVersionTag; import com.gemstone.gemfire.internal.cache.versions.VersionSource; import com.gemstone.gemfire.internal.cache.versions.VersionTag; -import com.gemstone.gemfire.test.dunit.DistributedSystemSupport; +import com.gemstone.gemfire.test.dunit.DistributedTestUtils; 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.SerializableCallable; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; @@ -132,7 +132,7 @@ public class PRBucketSynchronizationDUnitTest extends CacheTestCase { // Now we crash the primary bucket owner simulating death during distribution. // The backup buckets should perform a delta-GII for the lost member and // get back in sync - DistributedSystemSupport.crashDistributedSystem(primaryOwner); + DistributedTestUtils.crashDistributedSystem(primaryOwner); for (VM vm: verifyVMs) { verifySynchronized(vm, primaryID); @@ -200,7 +200,7 @@ public class PRBucketSynchronizationDUnitTest extends CacheTestCase { tag.setEntryVersion(1); tag.setIsRemoteForTesting(); EntryEventImpl event = EntryEventImpl.create(bucket, Operation.CREATE, "Object3", true, primary, true, false); - LogWriterSupport.getLogWriter().info("applying this event to the cache: " + event); + LogWriterUtils.getLogWriter().info("applying this event to the cache: " + event); event.setNewValue(new VMCachedDeserializable("value3", 12)); event.setVersionTag(tag); bucket.getRegionMap().basicPut(event, System.currentTimeMillis(), true, false, null, false, false); @@ -215,12 +215,12 @@ public class PRBucketSynchronizationDUnitTest extends CacheTestCase { event = EntryEventImpl.create(bucket, Operation.CREATE, "Object5", true, primary, true, false); event.setNewValue(Token.TOMBSTONE); event.setVersionTag(tag); - LogWriterSupport.getLogWriter().info("applying this event to the cache: " + event); + LogWriterUtils.getLogWriter().info("applying this event to the cache: " + event); bucket.getRegionMap().basicPut(event, System.currentTimeMillis(), true, false, null, false, false); event.release(); bucket.dumpBackingMap(); - LogWriterSupport.getLogWriter().info("bucket version vector is now " + bucket.getVersionVector().fullToString()); + LogWriterUtils.getLogWriter().info("bucket version vector is now " + bucket.getVersionVector().fullToString()); assertTrue("bucket should hold entry Object3 now", bucket.containsKey("Object3")); return true; } @@ -237,12 +237,12 @@ public class PRBucketSynchronizationDUnitTest extends CacheTestCase { boolean dumped = false; public boolean done() { if (TestRegion.getCache().getDistributionManager().isCurrentMember(crashedMember)) { - LogWriterSupport.getLogWriter().info(waitingFor); + LogWriterUtils.getLogWriter().info(waitingFor); return false; } if (!TestRegion.containsKey("Object3")) { waitingFor = "entry for Object3 not found"; - LogWriterSupport.getLogWriter().info(waitingFor); + LogWriterUtils.getLogWriter().info(waitingFor); return false; } RegionEntry re = bucket.getRegionMap().getEntry("Object5"); @@ -252,7 +252,7 @@ public class PRBucketSynchronizationDUnitTest extends CacheTestCase { bucket.dumpBackingMap(); } waitingFor = "entry for Object5 not found"; - LogWriterSupport.getLogWriter().info(waitingFor); + LogWriterUtils.getLogWriter().info(waitingFor); return false; } if (!re.isTombstone()) { @@ -261,7 +261,7 @@ public class PRBucketSynchronizationDUnitTest extends CacheTestCase { bucket.dumpBackingMap(); } waitingFor = "Object5 is not a tombstone but should be: " + re; - LogWriterSupport.getLogWriter().info(waitingFor); + LogWriterUtils.getLogWriter().info(waitingFor); return false; } return true; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionDUnitTest.java index 50c8353..0408eb7 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionDUnitTest.java @@ -188,7 +188,7 @@ public class PartitionedRegionDUnitTest extends MultiVMRegionTestCase { fact.addCacheListener(new CacheListenerAdapter(){ @Override public void afterInvalidate(EntryEvent event) { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("afterInvalidate invoked with " + event); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("afterInvalidate invoked with " + event); InvalidateInvoked = true; } });
