http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkRemoteVMDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkRemoteVMDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkRemoteVMDUnitTest.java index cec5032..6e6b6c8 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkRemoteVMDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkRemoteVMDUnitTest.java @@ -42,7 +42,7 @@ import com.gemstone.gemfire.cache.util.CacheWriterAdapter; 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.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -84,7 +84,7 @@ public class PutAllCallBkRemoteVMDUnitTest extends DistributedTestCase { VM vm1 = host.getVM(1); vm0.invoke(PutAllCallBkRemoteVMDUnitTest.class, "createCacheForVM0"); vm1.invoke(PutAllCallBkRemoteVMDUnitTest.class, "createCacheForVM1"); - LogWriterSupport.getLogWriter().info("Cache created successfully"); + LogWriterUtils.getLogWriter().info("Cache created successfully"); } public void preTearDown(){ @@ -170,7 +170,7 @@ public class PutAllCallBkRemoteVMDUnitTest extends DistributedTestCase { }catch (Exception ex){ throw new RuntimeException("exception putting entries", ex); } - LogWriterSupport.getLogWriter().info("****************paperRegion.get(afterCreate)***************"+paperRegion.get("afterCreate")); + LogWriterUtils.getLogWriter().info("****************paperRegion.get(afterCreate)***************"+paperRegion.get("afterCreate")); WaitCriterion ev = new WaitCriterion() { public boolean done() { @@ -340,9 +340,9 @@ public class PutAllCallBkRemoteVMDUnitTest extends DistributedTestCase { if(counter==null) counter = new Integer(1); paperRegion.put("afterCreate",new Integer(counter.intValue()+1)); - LogWriterSupport.getLogWriter().info("In afterCreate"+putAllcounter); + LogWriterUtils.getLogWriter().info("In afterCreate"+putAllcounter); if(putAllcounter == forCreate){ - LogWriterSupport.getLogWriter().info("performingtrue"); + LogWriterUtils.getLogWriter().info("performingtrue"); afterCreate = true; } try{ @@ -353,7 +353,7 @@ public class PutAllCallBkRemoteVMDUnitTest extends DistributedTestCase { } notified = true; - LogWriterSupport.getLogWriter().info("*******afterCreate***** Key :"+event.getKey()+ " Value :"+event.getNewValue()); + LogWriterUtils.getLogWriter().info("*******afterCreate***** Key :"+event.getKey()+ " Value :"+event.getNewValue()); } public void afterUpdate(EntryEvent event){ @@ -361,9 +361,9 @@ public class PutAllCallBkRemoteVMDUnitTest extends DistributedTestCase { Integer counter = (Integer)paperRegion.get("afterUpdate"); if(counter==null) counter = new Integer(1); paperRegion.put("afterUpdate",new Integer(counter.intValue()+1)); - LogWriterSupport.getLogWriter().info("In afterUpdate"+afterUpdateputAllcounter); + LogWriterUtils.getLogWriter().info("In afterUpdate"+afterUpdateputAllcounter); if(afterUpdateputAllcounter == forUpdate){ - LogWriterSupport.getLogWriter().info("performingtrue afterUpdate"); + LogWriterUtils.getLogWriter().info("performingtrue afterUpdate"); afterUpdate = true; } try{ @@ -376,7 +376,7 @@ public class PutAllCallBkRemoteVMDUnitTest extends DistributedTestCase { notified = true; - LogWriterSupport.getLogWriter().info("*******afterUpdate***** Key :"+event.getKey()+ " Value :"+event.getNewValue()); + LogWriterUtils.getLogWriter().info("*******afterUpdate***** Key :"+event.getKey()+ " Value :"+event.getNewValue()); } } @@ -386,15 +386,15 @@ public class PutAllCallBkRemoteVMDUnitTest extends DistributedTestCase { Integer counter = (Integer)paperRegion.get("beforeCreate"); if(counter==null) counter = new Integer(1); paperRegion.put("beforeCreate",new Integer(counter.intValue()+1)); - LogWriterSupport.getLogWriter().info("*******BeforeCreate***** event="+event); + LogWriterUtils.getLogWriter().info("*******BeforeCreate***** event="+event); } public void beforeUpdate(EntryEvent event) { Integer counter = (Integer)paperRegion.get("beforeUpdate"); if(counter==null) counter = new Integer(1); paperRegion.put("beforeUpdate",new Integer(counter.intValue()+1)); - LogWriterSupport.getLogWriter().info("In beforeUpdate"+beforeUpdateputAllcounter); - LogWriterSupport.getLogWriter().info("*******BeforeUpdate***** event="+event); + LogWriterUtils.getLogWriter().info("In beforeUpdate"+beforeUpdateputAllcounter); + LogWriterUtils.getLogWriter().info("*******BeforeUpdate***** event="+event); } } }// end of test class
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkSingleVMDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkSingleVMDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkSingleVMDUnitTest.java index f7e9fc3..82f3477 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkSingleVMDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/PutAllCallBkSingleVMDUnitTest.java @@ -42,7 +42,7 @@ import com.gemstone.gemfire.distributed.DistributedSystem; 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.LogWriterUtils; import com.gemstone.gemfire.test.dunit.VM; public class PutAllCallBkSingleVMDUnitTest extends DistributedTestCase{ @@ -74,7 +74,7 @@ public class PutAllCallBkSingleVMDUnitTest extends DistributedTestCase{ VM vm1 = host.getVM(1); vm0.invoke(PutAllCallBkSingleVMDUnitTest.class, "createCache"); vm1.invoke(PutAllCallBkSingleVMDUnitTest.class, "createCache"); - LogWriterSupport.getLogWriter().fine("Cache created in successfully"); + LogWriterUtils.getLogWriter().fine("Cache created in successfully"); } public void preTearDown(){ @@ -267,12 +267,12 @@ public class PutAllCallBkSingleVMDUnitTest extends DistributedTestCase{ static class AfterCreateCallback extends CacheListenerAdapter { public void afterCreate(EntryEvent event){ putAllcounter++; - LogWriterSupport.getLogWriter().fine("In afterCreate"+putAllcounter); + LogWriterUtils.getLogWriter().fine("In afterCreate"+putAllcounter); if (event.getOperation().isPutAll()) { assertEquals("putAllCreateCallback", event.getCallbackArgument()); } if(putAllcounter == 25){ - LogWriterSupport.getLogWriter().fine("performingtrue"); + LogWriterUtils.getLogWriter().fine("performingtrue"); afterCreate = true; } } @@ -281,12 +281,12 @@ public class PutAllCallBkSingleVMDUnitTest extends DistributedTestCase{ static class AfterUpdateCallback extends CacheListenerAdapter { public void afterUpdate(EntryEvent event){ afterUpdateputAllcounter++; - LogWriterSupport.getLogWriter().fine("In afterUpdate"+afterUpdateputAllcounter); + LogWriterUtils.getLogWriter().fine("In afterUpdate"+afterUpdateputAllcounter); if (event.getOperation().isPutAll()) { assertEquals("putAllAfterUpdateCallback", event.getCallbackArgument()); } if(afterUpdateputAllcounter == 5){ - LogWriterSupport.getLogWriter().fine("performingtrue afterUpdate"); + LogWriterUtils.getLogWriter().fine("performingtrue afterUpdate"); afterUpdate = true; } } @@ -294,12 +294,12 @@ public class PutAllCallBkSingleVMDUnitTest extends DistributedTestCase{ static class BeforeCreateCallback extends CacheWriterAdapter { public void beforeCreate(EntryEvent event){ beforeCreateputAllcounter++; - LogWriterSupport.getLogWriter().fine("In beforeCreate"+beforeCreateputAllcounter); + LogWriterUtils.getLogWriter().fine("In beforeCreate"+beforeCreateputAllcounter); if (event.getOperation().isPutAll()) { assertEquals("putAllCreateCallback", event.getCallbackArgument()); } if(beforeCreateputAllcounter == 25){ - LogWriterSupport.getLogWriter().fine("performingtrue beforeCreateputAll"); + LogWriterUtils.getLogWriter().fine("performingtrue beforeCreateputAll"); beforeCreate = true; } } @@ -307,12 +307,12 @@ public class PutAllCallBkSingleVMDUnitTest extends DistributedTestCase{ static class BeforeUpdateCallback extends CacheWriterAdapter { public void beforeUpdate(EntryEvent event){ beforeUpdateputAllcounter++; - LogWriterSupport.getLogWriter().fine("In beforeUpdate"+beforeUpdateputAllcounter); + LogWriterUtils.getLogWriter().fine("In beforeUpdate"+beforeUpdateputAllcounter); if (event.getOperation().isPutAll()) { assertEquals("putAllAfterUpdateCallback", event.getCallbackArgument()); } if(beforeUpdateputAllcounter == 5){ - LogWriterSupport.getLogWriter().fine("performingtrue beforeUpdate"); + LogWriterUtils.getLogWriter().fine("performingtrue beforeUpdate"); beforeUpdate = true; } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java index f0149f1..916634b 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java @@ -44,10 +44,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; @@ -116,7 +116,7 @@ public class RRSynchronizationDUnitTest extends CacheTestCase { // Now we crash the member who "modified" vm1's cache. // The other replicates should perform a delta-GII for the lost member and // get back in sync - DistributedSystemSupport.crashDistributedSystem(vm0); + DistributedTestUtils.crashDistributedSystem(vm0); verifySynchronized(vm2, crashedID); } finally { @@ -163,7 +163,7 @@ public class RRSynchronizationDUnitTest extends CacheTestCase { tag.setEntryVersion(1); tag.setIsRemoteForTesting(); EntryEventImpl event = EntryEventImpl.create(dr, Operation.CREATE, "Object3", true, forMember, 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); dr.getRegionMap().basicPut(event, System.currentTimeMillis(), true, false, null, false, false); @@ -178,12 +178,12 @@ public class RRSynchronizationDUnitTest extends CacheTestCase { event = EntryEventImpl.create(dr, Operation.CREATE, "Object5", true, forMember, 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); dr.getRegionMap().basicPut(event, System.currentTimeMillis(), true, false, null, false, false); event.release(); dr.dumpBackingMap(); - LogWriterSupport.getLogWriter().info("version vector is now " + dr.getVersionVector().fullToString()); + LogWriterUtils.getLogWriter().info("version vector is now " + dr.getVersionVector().fullToString()); assertTrue("should hold entry Object3 now", dr.containsKey("Object3")); return true; } @@ -199,12 +199,12 @@ public class RRSynchronizationDUnitTest 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 = dr.getRegionMap().getEntry("Object5"); @@ -214,7 +214,7 @@ public class RRSynchronizationDUnitTest extends CacheTestCase { dr.dumpBackingMap(); } waitingFor = "entry for Object5 not found"; - LogWriterSupport.getLogWriter().info(waitingFor); + LogWriterUtils.getLogWriter().info(waitingFor); return false; } if (!re.isTombstone()) { @@ -223,7 +223,7 @@ public class RRSynchronizationDUnitTest extends CacheTestCase { dr.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/ReconnectDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java index 55df06f..aa1949b 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java @@ -56,15 +56,15 @@ import com.gemstone.gemfire.internal.AvailablePortHelper; import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.AsyncInvocation; -import com.gemstone.gemfire.test.dunit.DistributedSystemSupport; import com.gemstone.gemfire.test.dunit.DistributedTestCase; +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.Invoke; -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; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -114,7 +114,7 @@ public class ReconnectDUnitTest extends CacheTestCase //Cache cache = getCache(); closeCache(); getSystem().disconnect(); - LogWriterSupport.getLogWriter().fine("Cache Closed "); + LogWriterUtils.getLogWriter().fine("Cache Closed "); } @Override @@ -127,7 +127,7 @@ public class ReconnectDUnitTest extends CacheTestCase dsProperties.put(DistributionConfig.LOCATORS_NAME, "localHost["+this.locatorPort+"]"); dsProperties.put(DistributionConfig.MCAST_PORT_NAME, "0"); dsProperties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000"); - dsProperties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + dsProperties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); } return dsProperties; } @@ -138,7 +138,7 @@ public class ReconnectDUnitTest extends CacheTestCase Host.getHost(0).getVM(locatorVMNumber).invoke(new SerializableRunnable("stop locator") { public void run() { if (locator != null) { - LogWriterSupport.getLogWriter().info("stopping locator " + locator); + LogWriterUtils.getLogWriter().info("stopping locator " + locator); locator.stop(); } } @@ -238,7 +238,7 @@ public class ReconnectDUnitTest extends CacheTestCase waitForReconnect(vm1); System.out.println("done reconnecting vm0 and vm1"); } catch (Exception e) { - Threads.dumpAllStacks(); + ThreadUtils.dumpAllStacks(); throw e; } } @@ -267,7 +267,7 @@ public class ReconnectDUnitTest extends CacheTestCase final int locPort = locatorPort; final int secondLocPort = AvailablePortHelper.getRandomAvailableTCPPort(); - DistributedSystemSupport.deleteLocatorStateFile(locPort, secondLocPort); + DistributedTestUtils.deleteLocatorStateFile(locPort, secondLocPort); final String xmlFileLoc = (new File(".")).getAbsolutePath(); @@ -322,7 +322,7 @@ public class ReconnectDUnitTest extends CacheTestCase } try { new CacheFactory(props).create(); - LogWriterSupport.getLogWriter().error("testReconnectCollidesWithApplication failed - application thread was able to create a cache"); + LogWriterUtils.getLogWriter().error("testReconnectCollidesWithApplication failed - application thread was able to create a cache"); } catch (IllegalStateException cacheExists) { // expected } @@ -350,8 +350,8 @@ public class ReconnectDUnitTest extends CacheTestCase return "waiting for ds to begin reconnecting"; } }, 30000, 1000, true); - LogWriterSupport.getLogWriter().info("entering reconnect wait for " + ds); - LogWriterSupport.getLogWriter().info("ds.isReconnecting() = " + ds.isReconnecting()); + LogWriterUtils.getLogWriter().info("entering reconnect wait for " + ds); + LogWriterUtils.getLogWriter().info("ds.isReconnecting() = " + ds.isReconnecting()); boolean failure = true; try { ds.waitUntilReconnected(60, TimeUnit.SECONDS); @@ -364,7 +364,7 @@ public class ReconnectDUnitTest extends CacheTestCase failure = false; return ds.getReconnectedSystem().getDistributedMember(); } catch (InterruptedException e) { - LogWriterSupport.getLogWriter().warning("interrupted while waiting for reconnect"); + LogWriterUtils.getLogWriter().warning("interrupted while waiting for reconnect"); return null; } finally { if (failure) { @@ -393,7 +393,7 @@ public class ReconnectDUnitTest extends CacheTestCase assertFalse(ds.isReconnecting()); DistributedSystem newDs = InternalDistributedSystem.getAnyInstance(); if (newDs != null) { - LogWriterSupport.getLogWriter().warning("expected distributed system to be disconnected: " + newDs); + LogWriterUtils.getLogWriter().warning("expected distributed system to be disconnected: " + newDs); return false; } return true; @@ -406,8 +406,8 @@ public class ReconnectDUnitTest extends CacheTestCase forceDisconnect(vm1); newdm = waitForReconnect(vm1); assertNotSame("expected a reconnect to occur in member", dm, newdm); - DistributedSystemSupport.deleteLocatorStateFile(locPort); - DistributedSystemSupport.deleteLocatorStateFile(secondLocPort); + DistributedTestUtils.deleteLocatorStateFile(locPort); + DistributedTestUtils.deleteLocatorStateFile(secondLocPort); } private DistributedMember getDMID(VM vm) { @@ -434,7 +434,7 @@ public class ReconnectDUnitTest extends CacheTestCase } }, 30000, 1000, true); long waitTime = 120; - LogWriterSupport.getLogWriter().info("VM"+VM.getCurrentVMNum() + " waiting up to "+waitTime+" seconds for reconnect to complete"); + LogWriterUtils.getLogWriter().info("VM"+VM.getCurrentVMNum() + " waiting up to "+waitTime+" seconds for reconnect to complete"); try { ds.waitUntilReconnected(waitTime, TimeUnit.SECONDS); } catch (InterruptedException e) { @@ -460,7 +460,7 @@ public class ReconnectDUnitTest extends CacheTestCase final int locPort = locatorPort; final int secondLocPort = AvailablePortHelper.getRandomAvailableTCPPort(); - DistributedSystemSupport.deleteLocatorStateFile(locPort, secondLocPort); + DistributedTestUtils.deleteLocatorStateFile(locPort, secondLocPort); final String xmlFileLoc = (new File(".")).getAbsolutePath(); @@ -532,11 +532,11 @@ public class ReconnectDUnitTest extends CacheTestCase }; Wait.waitForCriterion(wc, 30000, 1000, false); if (Locator.getLocator() == null) { - LogWriterSupport.getLogWriter().error("expected to find a running locator but getLocator() returns null"); + LogWriterUtils.getLogWriter().error("expected to find a running locator but getLocator() returns null"); return false; } if (((InternalLocator)Locator.getLocator()).isStopped()) { - LogWriterSupport.getLogWriter().error("found a stopped locator"); + LogWriterUtils.getLogWriter().error("found a stopped locator"); return false; } return true; @@ -568,8 +568,8 @@ public class ReconnectDUnitTest extends CacheTestCase gfshThread = null; } }); - DistributedSystemSupport.deleteLocatorStateFile(locPort); - DistributedSystemSupport.deleteLocatorStateFile(secondLocPort); + DistributedTestUtils.deleteLocatorStateFile(locPort); + DistributedTestUtils.deleteLocatorStateFile(secondLocPort); } } @@ -625,7 +625,7 @@ public class ReconnectDUnitTest extends CacheTestCase locatorPort = locPort; Properties config = getDistributedSystemProperties(); config.put(DistributionConfig.ROLES_NAME, ""); - config.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + config.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); // config.put("log-file", "roleLossController.log"); //creating the DS getSystem(config); @@ -654,7 +654,7 @@ public class ReconnectDUnitTest extends CacheTestCase closeCache(); getSystem().disconnect(); - LogWriterSupport.getLogWriter().info("disconnected from the system..."); + LogWriterUtils.getLogWriter().info("disconnected from the system..."); Host host = Host.getHost(0); VM vm0 = host.getVM(0); @@ -665,14 +665,14 @@ public class ReconnectDUnitTest extends CacheTestCase "ROLERECONNECTTESTS") { public void run2() throws CacheException, RuntimeException { - LogWriterSupport.getLogWriter().info("####### STARTING THE REAL TEST ##########"); + LogWriterUtils.getLogWriter().info("####### STARTING THE REAL TEST ##########"); locatorPort = locPort; Properties props = getDistributedSystemProperties(); props.put("cache-xml-file", xmlFileLoc+File.separator+"RoleReconnect-cache.xml"); props.put("max-wait-time-reconnect", "200"); final int timeReconnect = 3; props.put("max-num-reconnect-tries", "3"); - props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); props.put("log-file", "roleLossVM0.log"); getSystem(props); @@ -686,13 +686,13 @@ public class ReconnectDUnitTest extends CacheTestCase throw new RuntimeException("The test should throw a CancelException "); } catch (CancelException ignor){ // can be caused by role loss during intialization. - LogWriterSupport.getLogWriter().info("Got Expected CancelException "); + LogWriterUtils.getLogWriter().info("Got Expected CancelException "); } finally { system.getLogWriter().info("<ExpectedException action=remove>" + "CacheClosedException" + "</ExpectedException"); } - LogWriterSupport.getLogWriter().fine("roleLoss Sleeping SO call dumprun.sh"); + LogWriterUtils.getLogWriter().fine("roleLoss Sleeping SO call dumprun.sh"); WaitCriterion ev = new WaitCriterion() { public boolean done() { return reconnectTries >= timeReconnect; @@ -702,7 +702,7 @@ public class ReconnectDUnitTest extends CacheTestCase } }; Wait.waitForCriterion(ev, 60 * 1000, 200, true); - LogWriterSupport.getLogWriter().fine("roleLoss done Sleeping"); + LogWriterUtils.getLogWriter().fine("roleLoss done Sleeping"); assertEquals(timeReconnect, reconnectTries); } @@ -758,7 +758,7 @@ public class ReconnectDUnitTest extends CacheTestCase locatorPort = locPort; Properties config = getDistributedSystemProperties(); config.put(DistributionConfig.ROLES_NAME, ""); - config.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + config.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); //creating the DS getSystem(config); @@ -812,7 +812,7 @@ public class ReconnectDUnitTest extends CacheTestCase + " trying to reconnect"); final AsyncInvocation roleLossAsync = vm0.invokeAsync(roleLoss); - LogWriterSupport.getLogWriter().info("waiting for role loss vm to start reconnect attempts"); + LogWriterUtils.getLogWriter().info("waiting for role loss vm to start reconnect attempts"); WaitCriterion ev = new WaitCriterion() { public boolean done() { @@ -853,15 +853,15 @@ public class ReconnectDUnitTest extends CacheTestCase getLogWriter().severe("Exception : "+ee); } }*/ - LogWriterSupport.getLogWriter().info("waiting for vm0 to finish reconnecting"); - Threads.join(roleLossAsync, 120 * 1000, LogWriterSupport.getLogWriter()); + LogWriterUtils.getLogWriter().info("waiting for vm0 to finish reconnecting"); + ThreadUtils.join(roleLossAsync, 120 * 1000); } if (roleLossAsync.getException() != null){ Assert.fail("Exception in Vm0", roleLossAsync.getException()); } - Threads.join(avkVm1, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(avkVm1, 30 * 1000); if (avkVm1.getException() != null){ Assert.fail("Exception in Vm1", avkVm1.getException()); } @@ -879,7 +879,7 @@ public class ReconnectDUnitTest extends CacheTestCase try { // closeCache(); // getSystem().disconnect(); - LogWriterSupport.getLogWriter().info(startupMessage); + LogWriterUtils.getLogWriter().info(startupMessage); WaitCriterion ev = new WaitCriterion() { public boolean done() { return ((Boolean)otherVM.invoke(ReconnectDUnitTest.class, "isInitialRolePlayerStarted")).booleanValue(); @@ -890,13 +890,13 @@ public class ReconnectDUnitTest extends CacheTestCase }; Wait.waitForCriterion(ev, 10 * 1000, 200, true); - LogWriterSupport.getLogWriter().info("Starting the test and creating the cache and regions etc ..."); + LogWriterUtils.getLogWriter().info("Starting the test and creating the cache and regions etc ..."); locatorPort = locPort; Properties props = getDistributedSystemProperties(); props.put("cache-xml-file", "RoleRegained.xml"); props.put("max-wait-time-reconnect", "3000"); props.put("max-num-reconnect-tries", "8"); - props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); getSystem(props); system.getLogWriter().info("<ExpectedException action=add>" @@ -906,7 +906,7 @@ public class ReconnectDUnitTest extends CacheTestCase getCache(); } catch (CancelException e) { // can happen if RoleA goes away during initialization - LogWriterSupport.getLogWriter().info("cache threw CancelException while creating the cache"); + LogWriterUtils.getLogWriter().info("cache threw CancelException while creating the cache"); } initialized = true; @@ -915,7 +915,7 @@ public class ReconnectDUnitTest extends CacheTestCase ev = new WaitCriterion() { public boolean done() { - LogWriterSupport.getLogWriter().info("ReconnectTries=" + reconnectTries); + LogWriterUtils.getLogWriter().info("ReconnectTries=" + reconnectTries); return reconnectTries != 0; } public String description() { @@ -972,8 +972,8 @@ public class ReconnectDUnitTest extends CacheTestCase excuse = "value is wrong"; return false; } - LogWriterSupport.getLogWriter().info("All assertions passed"); - LogWriterSupport.getLogWriter().info("MyKey : "+key+" and myvalue : "+value); + LogWriterUtils.getLogWriter().info("All assertions passed"); + LogWriterUtils.getLogWriter().info("MyKey : "+key+" and myvalue : "+value); return true; } catch (CancelException ecc){ @@ -984,7 +984,7 @@ public class ReconnectDUnitTest extends CacheTestCase } finally { - LogWriterSupport.getLogWriter().info("waiting for reconnect. Current status is '"+excuse+"'"); + LogWriterUtils.getLogWriter().info("waiting for reconnect. Current status is '"+excuse+"'"); } return false; } @@ -1005,11 +1005,11 @@ public class ReconnectDUnitTest extends CacheTestCase throw e; } catch (Error th) { - LogWriterSupport.getLogWriter().severe("DEBUG", th); + LogWriterUtils.getLogWriter().severe("DEBUG", th); throw th; } finally { if (t != null) { - Threads.join(t, 2 * 60 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(t, 2 * 60 * 1000); } // greplogs won't care if you remove an exception that was never added, // and this ensures that it gets removed. @@ -1029,12 +1029,12 @@ public class ReconnectDUnitTest extends CacheTestCase "second RoleA player") { public void run2() throws CacheException { - LogWriterSupport.getLogWriter().info(startupMessage); + LogWriterUtils.getLogWriter().info(startupMessage); //closeCache(); // getSystem().disconnect(); locatorPort = locPort; Properties props = getDistributedSystemProperties(); - props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); props.put(DistributionConfig.ROLES_NAME, "RoleA"); getSystem(props); @@ -1045,7 +1045,7 @@ public class ReconnectDUnitTest extends CacheTestCase RegionAttributes attr = fac.create(); Region region = createRootRegion(regionName, attr); - LogWriterSupport.getLogWriter().info("STARTED THE REQUIREDROLES CACHE"); + LogWriterUtils.getLogWriter().info("STARTED THE REQUIREDROLES CACHE"); try{ Thread.sleep(120); } @@ -1062,7 +1062,7 @@ public class ReconnectDUnitTest extends CacheTestCase catch(InterruptedException ee){ fail("interrupted"); } - LogWriterSupport.getLogWriter().info("RolePlayer is done..."); + LogWriterUtils.getLogWriter().info("RolePlayer is done..."); } @@ -1081,10 +1081,10 @@ public class ReconnectDUnitTest extends CacheTestCase { // closeCache(); // getSystem().disconnect(); - LogWriterSupport.getLogWriter().info(startupMessage); + LogWriterUtils.getLogWriter().info(startupMessage); locatorPort = locPort; Properties props = getDistributedSystemProperties(); - props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); props.put(DistributionConfig.ROLES_NAME, "RoleA"); getSystem(props); @@ -1095,7 +1095,7 @@ public class ReconnectDUnitTest extends CacheTestCase RegionAttributes attr = fac.create(); createRootRegion(regionName, attr); - LogWriterSupport.getLogWriter().info("STARTED THE REQUIREDROLES CACHE"); + LogWriterUtils.getLogWriter().info("STARTED THE REQUIREDROLES CACHE"); initialRolePlayerStarted = true; while(!((Boolean)otherVM.invoke(ReconnectDUnitTest.class, "isInitialized")).booleanValue()){ @@ -1105,7 +1105,7 @@ public class ReconnectDUnitTest extends CacheTestCase fail("interrupted"); } } - LogWriterSupport.getLogWriter().info("RoleAPlayerInitializer is done..."); + LogWriterUtils.getLogWriter().info("RoleAPlayerInitializer is done..."); closeCache(); } @@ -1115,10 +1115,10 @@ public class ReconnectDUnitTest extends CacheTestCase void addReconnectListener() { reconnectTries = 0; // reset the count for this listener - LogWriterSupport.getLogWriter().info("adding reconnect listener"); + LogWriterUtils.getLogWriter().info("adding reconnect listener"); ReconnectListener reconlis = new ReconnectListener() { public void reconnecting(InternalDistributedSystem oldSys) { - LogWriterSupport.getLogWriter().info("reconnect listener invoked"); + LogWriterUtils.getLogWriter().info("reconnect listener invoked"); reconnectTries++; } public void onReconnect(InternalDistributedSystem system1, InternalDistributedSystem system2) {} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionExpirationDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionExpirationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionExpirationDUnitTest.java index a6e228c..4187aaf 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionExpirationDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionExpirationDUnitTest.java @@ -24,7 +24,7 @@ import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.RegionAttributes; import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -164,9 +164,9 @@ public class RegionExpirationDUnitTest extends CacheTestCase { Host host = Host.getHost(0); VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); - LogWriterSupport.getLogWriter().info("vm0 is " + vm0.getPid() + ", vm1 is " + vm1); + LogWriterUtils.getLogWriter().info("vm0 is " + vm0.getPid() + ", vm1 is " + vm1); - LogWriterSupport.getLogWriter().info("2: " + regionName + " action is " + action); + LogWriterUtils.getLogWriter().info("2: " + regionName + " action is " + action); final long tilt = System.currentTimeMillis() + timeoutSecs * 1000; @@ -218,7 +218,7 @@ public class RegionExpirationDUnitTest extends CacheTestCase { vm0.invoke(new CacheSerializableRunnable("Get") { public void run2() throws CacheException { Region region = getRootRegion().getSubregion(regionName); - LogWriterSupport.getLogWriter().info("3: " + regionName + ", " + region + ", action is " + action); + LogWriterUtils.getLogWriter().info("3: " + regionName + ", " + region + ", action is " + action); if (action.isInvalidate() || action.isLocalInvalidate()) { assertTrue(!region.containsValueForKey(key)); } else { @@ -255,7 +255,7 @@ public class RegionExpirationDUnitTest extends CacheTestCase { factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); RegionAttributes attrs = factory.create(); - LogWriterSupport.getLogWriter().info("4: " + regionName + " ttl action is " + ttl); + LogWriterUtils.getLogWriter().info("4: " + regionName + " ttl action is " + ttl); getOrCreateRootRegion().createSubregion(regionName, attrs); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java index 055bf36..d539b82 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java @@ -38,7 +38,7 @@ import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor.CacheProfile import com.gemstone.gemfire.internal.cache.DistributedRegion; import com.gemstone.gemfire.internal.cache.GemFireCacheImpl; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -367,7 +367,7 @@ public class RegionMembershipListenerDUnitTest extends CacheTestCase { return MyRML.this.toString() + " waiting for Op " + op + " when lastOp was " + getOpName(MyRML.this.lastOp); } }; - LogWriterSupport.getLogWriter().info(this.toString() + " waiting for Op " + getOpName(op) + LogWriterUtils.getLogWriter().info(this.toString() + " waiting for Op " + getOpName(op) + " when lastOp was " + getOpName(this.lastOp)); Wait.waitForCriterion(ev, this.timeOut, 200, true); assertEquals(op, this.lastOp); @@ -388,7 +388,7 @@ public class RegionMembershipListenerDUnitTest extends CacheTestCase { this.lastOp = Op.Initial; this.lastEvent = null; this.initialMembers = initialMembers; - LogWriterSupport.getLogWriter().info(this.toString() + " received initialMembers notification for region " + r + LogWriterUtils.getLogWriter().info(this.toString() + " received initialMembers notification for region " + r + " with members " + Arrays.deepToString(initialMembers)); } public void afterRemoteRegionCreate(RegionEvent event) { @@ -398,23 +398,23 @@ public class RegionMembershipListenerDUnitTest extends CacheTestCase { if (cacheProfile != null) { this.memberInitialized = cacheProfile.regionInitialized; if (!this.memberInitialized) { - LogWriterSupport.getLogWriter().warning("afterRemoteRegionCreate invoked when member is not done initializing!", new Exception("stack trace")); + LogWriterUtils.getLogWriter().warning("afterRemoteRegionCreate invoked when member is not done initializing!", new Exception("stack trace")); } - LogWriterSupport.getLogWriter().info(this.toString() + " received afterRemoteRegionCreate notification for event " + event); + LogWriterUtils.getLogWriter().info(this.toString() + " received afterRemoteRegionCreate notification for event " + event); } else { - LogWriterSupport.getLogWriter().warning("afterRemoteRegionCreate was expecting a profile in the event callback but there was none. " + + LogWriterUtils.getLogWriter().warning("afterRemoteRegionCreate was expecting a profile in the event callback but there was none. " + " This indicates a problem with the test hook DistributedRegion.TEST_HOOK_ADD_PROFILE"); } } public void afterRemoteRegionDeparture(RegionEvent event) { this.lastOp = Op.Departure; this.lastEvent = event; - LogWriterSupport.getLogWriter().info(this.toString() + " received afterRemoteRegionDeparture notification for event " + event); + LogWriterUtils.getLogWriter().info(this.toString() + " received afterRemoteRegionDeparture notification for event " + event); } public void afterRemoteRegionCrash(RegionEvent event) { this.lastOp = Op.Crash; this.lastEvent = event; - LogWriterSupport.getLogWriter().info(this.toString() + " received afterRemoteRegionCrash notification for event " + event); + LogWriterUtils.getLogWriter().info(this.toString() + " received afterRemoteRegionCrash notification for event " + event); } } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java index 5399b4b..2ae8293 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java @@ -66,9 +66,8 @@ import com.gemstone.gemfire.internal.cache.TXState; import com.gemstone.gemfire.internal.cache.TXStateInterface; import com.gemstone.gemfire.internal.cache.TXStateProxyImpl; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; 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.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -1414,7 +1413,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase { } }); - Threads.join(thread, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(thread, 30 * 1000); assertTrue(region.isDestroyed()); try { region.put("fee", "fi"); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java index 326bc73..ed89a13 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java @@ -260,7 +260,7 @@ public abstract class RegionTestCase extends CacheTestCase { assertEquals(value, values.iterator().next()); } catch (UnsupportedOperationException uoe) { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Region.values() reported UnsupportedOperation"); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Region.values() reported UnsupportedOperation"); } } @@ -464,7 +464,7 @@ public abstract class RegionTestCase extends CacheTestCase { region.destroy(key); Region.Entry entry2 = region.getEntry(key); - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().info("Found entry for destroyed key: " + entry2); + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Found entry for destroyed key: " + entry2); assertNull(entry2); if (entry.isLocal()) { assertTrue(entry.isDestroyed()); @@ -1975,7 +1975,7 @@ public abstract class RegionTestCase extends CacheTestCase { continue; } if (now >= tilt - SLOP) { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().warning("Entry invalidated sloppily " + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().warning("Entry invalidated sloppily " + "now=" + now + " tilt=" + tilt + " delta = " + (tilt - now)); break; } @@ -2046,7 +2046,7 @@ public abstract class RegionTestCase extends CacheTestCase { continue; } if (now >= tilt - SLOP) { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().warning("Entry destroyed sloppily " + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().warning("Entry destroyed sloppily " + "now=" + now + " tilt=" + tilt + " delta = " + (tilt - now)); break; } @@ -2090,7 +2090,7 @@ public abstract class RegionTestCase extends CacheTestCase { continue; } if (now >= tilt - SLOP) { - com.gemstone.gemfire.test.dunit.LogWriterSupport.getLogWriter().warning("Region destroyed sloppily " + com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().warning("Region destroyed sloppily " + "now=" + now + " tilt=" + tilt + " delta = " + (tilt - now)); break; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java index 3e5ed6a..1e69266 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java @@ -35,9 +35,9 @@ import com.gemstone.gemfire.distributed.Role; import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.distributed.internal.membership.InternalRole; 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.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; @@ -223,7 +223,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase { // create region in vm3... gain for 2 roles Host.getHost(0).getVM(vm3).invoke(create); - Threads.join(threadA, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(threadA, 30 * 1000); assertTrue(this.finishTestWaitForRequiredRoles); assertTrue(this.rolesTestWaitForRequiredRoles.isEmpty()); @@ -243,7 +243,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase { this.finishTestWaitForRequiredRoles = false; threadA = new Thread(group, runWaitForRequiredRoles); threadA.start(); - Threads.join(threadA, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(threadA, 30 * 1000); assertTrue(this.startTestWaitForRequiredRoles); assertTrue(this.finishTestWaitForRequiredRoles); assertTrue(this.rolesTestWaitForRequiredRoles.isEmpty()); @@ -256,7 +256,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase { this.finishTestWaitForRequiredRoles = false; threadA = new Thread(group, runWaitForRequiredRoles); threadA.start(); - Threads.join(threadA, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(threadA, 30 * 1000); assertTrue(this.startTestWaitForRequiredRoles); assertTrue(this.finishTestWaitForRequiredRoles); assertTrue(this.rolesTestWaitForRequiredRoles.isEmpty()); @@ -286,7 +286,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase { // end the wait and make sure no roles are missing Host.getHost(0).getVM(vm2).invoke(create); - Threads.join(threadA, 30 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(threadA, 30 * 1000); assertTrue(this.startTestWaitForRequiredRoles); assertTrue(this.finishTestWaitForRequiredRoles); assertTrue(this.rolesTestWaitForRequiredRoles.isEmpty()); @@ -432,7 +432,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase { SystemFailure.setFailure((VirtualMachineError)e); // don't throw } String s = "Uncaught exception in thread " + t; - LogWriterSupport.getLogWriter().error(s, e); + LogWriterUtils.getLogWriter().error(s, e); fail(s); } }; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java index e0249e0..e7c0ba7 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java @@ -26,7 +26,7 @@ import com.gemstone.gemfire.cache.RegionAttributes; import com.gemstone.gemfire.cache.Scope; 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.LogWriterUtils; import com.gemstone.gemfire.test.dunit.SerializableRunnable; /** @@ -64,7 +64,7 @@ public class RolePerformanceDUnitTest extends CacheTestCase { throw e; } else { - LogWriterSupport.getLogWriter().info("testRolePerformance attempt #" + i + + LogWriterUtils.getLogWriter().info("testRolePerformance attempt #" + i + " failed -- reattempting up to 10x", e); } } @@ -102,7 +102,7 @@ public class RolePerformanceDUnitTest extends CacheTestCase { String data = name + " results: millisNoRoles=" + millisNoRoles + ", millisWithRoles=" + millisWithRoles + ", deviation=" + deviation + ", ceiling=" + ceiling; - LogWriterSupport.getLogWriter().info(data); + LogWriterUtils.getLogWriter().info(data); assertTrue("millisWithRoles is greater than allowable deviation: " + data, millisWithRoles <= ceiling); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java index 2523cad..01aa205 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java @@ -39,7 +39,7 @@ import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.IgnoredException; import com.gemstone.gemfire.test.dunit.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; @@ -271,9 +271,9 @@ public class SearchAndLoadDUnitTest extends CacheTestCase { public void run2() { Region region = getCache().getRegion("root/"+name); - LogWriterSupport.getLogWriter().info("t1 is invoking get("+objectName+")"); + LogWriterUtils.getLogWriter().info("t1 is invoking get("+objectName+")"); try { - LogWriterSupport.getLogWriter().info("t1 retrieved value " + region.get(objectName)); + LogWriterUtils.getLogWriter().info("t1 retrieved value " + region.get(objectName)); fail("first load should have triggered an exception"); } catch (RuntimeException e) { if (!e.getMessage().contains(exceptionString)) { @@ -288,7 +288,7 @@ public class SearchAndLoadDUnitTest extends CacheTestCase { final Object[] valueHolder = new Object[1]; // wait for vm1 to cause the loader to be invoked - LogWriterSupport.getLogWriter().info("t2 is waiting for loader to be invoked by t1"); + LogWriterUtils.getLogWriter().info("t2 is waiting for loader to be invoked by t1"); try { loaderInvokedLatch.await(30, TimeUnit.SECONDS); } catch (InterruptedException e) { @@ -327,7 +327,7 @@ public class SearchAndLoadDUnitTest extends CacheTestCase { fail("get() operation blocked for too long - test needs some work"); } - LogWriterSupport.getLogWriter().info("t2 is invoking get("+objectName+")"); + LogWriterUtils.getLogWriter().info("t2 is invoking get("+objectName+")"); Object value = valueHolder[0]; if (value instanceof RuntimeException) { if ( ((Exception)value).getMessage().contains(exceptionString) ) { @@ -336,7 +336,7 @@ public class SearchAndLoadDUnitTest extends CacheTestCase { throw (RuntimeException)value; } } else { - LogWriterSupport.getLogWriter().info("t2 retrieved value " + value); + LogWriterUtils.getLogWriter().info("t2 retrieved value " + value); assertNotNull(value); } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java index 9ab9867..899fbb1 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java @@ -40,9 +40,9 @@ import com.gemstone.gemfire.distributed.internal.DM; import com.gemstone.gemfire.distributed.internal.DMStats; import com.gemstone.gemfire.internal.tcp.Connection; 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; @@ -295,7 +295,7 @@ public class SlowRecDUnitTest extends CacheTestCase { dequeuedMsgs = stats.getAsyncDequeuedMsgs(); curQueuedMsgs = queuedMsgs - dequeuedMsgs; } - LogWriterSupport.getLogWriter().info("After " + count + " " + " puts slowrec mode kicked in by queuing " + queuedMsgs + " for a total size of " + queueSize); + LogWriterUtils.getLogWriter().info("After " + count + " " + " puts slowrec mode kicked in by queuing " + queuedMsgs + " for a total size of " + queueSize); } finally { forceQueueFlush(); } @@ -310,7 +310,7 @@ public class SlowRecDUnitTest extends CacheTestCase { final long start = System.currentTimeMillis(); Wait.waitForCriterion(ev, 30 * 1000, 200, true); final long finish = System.currentTimeMillis(); - LogWriterSupport.getLogWriter().info("After " + (finish - start) + " ms async msgs where flushed. A total of " + stats.getAsyncDequeuedMsgs() + " were flushed. lastValue=" + lastValue); + LogWriterUtils.getLogWriter().info("After " + (finish - start) + " ms async msgs where flushed. A total of " + stats.getAsyncDequeuedMsgs() + " were flushed. lastValue=" + lastValue); checkLastValueInOtherVm(lastValue, null); } @@ -393,7 +393,7 @@ public class SlowRecDUnitTest extends CacheTestCase { // + " dequeuedMsgs=" + dequeuedMsgs // + " conflatedMsgs=" + conflatedMsgs); final long finish = System.currentTimeMillis(); - LogWriterSupport.getLogWriter().info("After " + (finish - start) + " ms async msgs where flushed. A total of " + (stats.getAsyncDequeuedMsgs()-intialDeQueuedMsgs) + " were flushed. Leaving a queue size of " + stats.getAsyncQueueSize() + ". The lastValue was " + lastValue); + LogWriterUtils.getLogWriter().info("After " + (finish - start) + " ms async msgs where flushed. A total of " + (stats.getAsyncDequeuedMsgs()-intialDeQueuedMsgs) + " were flushed. Leaving a queue size of " + stats.getAsyncQueueSize() + ". The lastValue was " + lastValue); checkLastValueInOtherVm(lastValue, null); } @@ -437,8 +437,8 @@ public class SlowRecDUnitTest extends CacheTestCase { // give threads a chance to get queued try {Thread.sleep(100);} catch (InterruptedException ignore) {fail("interrupted");} forceQueueFlush(); - Threads.join(t, 2 * 1000, LogWriterSupport.getLogWriter()); - Threads.join(t2, 2 * 1000, LogWriterSupport.getLogWriter()); + ThreadUtils.join(t, 2 * 1000); + ThreadUtils.join(t2, 2 * 1000); long endQueuedMsgs = stats.getAsyncQueuedMsgs(); long endConflatedMsgs = stats.getAsyncConflatedMsgs(); assertEquals(startConflatedMsgs, endConflatedMsgs); @@ -481,7 +481,7 @@ public class SlowRecDUnitTest extends CacheTestCase { // now make sure update+destroy does not conflate final Object key = "key"; - LogWriterSupport.getLogWriter().info("[testConflationSequence] about to force queuing"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] about to force queuing"); forceQueuing(r); int count = 0; @@ -493,7 +493,7 @@ public class SlowRecDUnitTest extends CacheTestCase { // long dequeuedMsgs = stats.getAsyncDequeuedMsgs(); int endCount = count+60; - LogWriterSupport.getLogWriter().info("[testConflationSequence] about to build up queue"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] about to build up queue"); long begin = System.currentTimeMillis(); while (count < endCount) { value = "count=" + count; @@ -516,14 +516,14 @@ public class SlowRecDUnitTest extends CacheTestCase { checkLastValueInOtherVm(lastValue, mylcb); // now make sure create+update+localDestroy does not conflate - LogWriterSupport.getLogWriter().info("[testConflationSequence] force queuing create-update-destroy"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] force queuing create-update-destroy"); forceQueuing(r); initialConflatedMsgs = stats.getAsyncConflatedMsgs(); // initialDequeuedMsgs = stats.getAsyncDequeuedMsgs(); // dequeuedMsgs = stats.getAsyncDequeuedMsgs(); endCount = count + 40; - LogWriterSupport.getLogWriter().info("[testConflationSequence] create-update-destroy"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] create-update-destroy"); begin = System.currentTimeMillis(); while (count < endCount) { value = "count=" + count; @@ -543,7 +543,7 @@ public class SlowRecDUnitTest extends CacheTestCase { checkLastValueInOtherVm(lastValue, null); // now make sure update+invalidate does not conflate - LogWriterSupport.getLogWriter().info("[testConflationSequence] force queuing update-invalidate"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] force queuing update-invalidate"); forceQueuing(r); initialConflatedMsgs = stats.getAsyncConflatedMsgs(); // initialDequeuedMsgs = stats.getAsyncDequeuedMsgs(); @@ -554,7 +554,7 @@ public class SlowRecDUnitTest extends CacheTestCase { // dequeuedMsgs = stats.getAsyncDequeuedMsgs(); endCount = count + 40; - LogWriterSupport.getLogWriter().info("[testConflationSequence] update-invalidate"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] update-invalidate"); begin = System.currentTimeMillis(); while (count < endCount) { value = "count=" + count; @@ -569,14 +569,14 @@ public class SlowRecDUnitTest extends CacheTestCase { } assertEquals(initialConflatedMsgs, stats.getAsyncConflatedMsgs()); forceQueueFlush(); - LogWriterSupport.getLogWriter().info("[testConflationSequence] assert other vm"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] assert other vm"); checkLastValueInOtherVm(lastValue, null); r.destroy(key); // now make sure updates to a conflating region are conflated even while // updates to a non-conflating are not. - LogWriterSupport.getLogWriter().info("[testConflationSequence] conflate & no-conflate regions"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] conflate & no-conflate regions"); forceQueuing(r); final int initialAsyncSocketWrites = stats.getAsyncSocketWrites(); // initialDequeuedMsgs = stats.getAsyncDequeuedMsgs(); @@ -606,7 +606,7 @@ public class SlowRecDUnitTest extends CacheTestCase { endCount = count + 80; begin = System.currentTimeMillis(); - LogWriterSupport.getLogWriter().info("[testConflationSequence:DEBUG] count=" + count + LogWriterUtils.getLogWriter().info("[testConflationSequence:DEBUG] count=" + count + " queuedMsgs=" + stats.getAsyncQueuedMsgs() + " conflatedMsgs=" + stats.getAsyncConflatedMsgs() + " dequeuedMsgs=" + stats.getAsyncDequeuedMsgs() @@ -637,7 +637,7 @@ public class SlowRecDUnitTest extends CacheTestCase { } forceQueueFlush(); - LogWriterSupport.getLogWriter().info("[testConflationSequence] assert other vm"); + LogWriterUtils.getLogWriter().info("[testConflationSequence] assert other vm"); checkLastValueInOtherVm(lastValue, null); } /** @@ -688,7 +688,7 @@ public class SlowRecDUnitTest extends CacheTestCase { fail("should have exceeded max-queue-size by now"); } } - LogWriterSupport.getLogWriter().info("After " + count + " " + VALUE_SIZE + " byte puts slowrec mode kicked in but the queue filled when its size reached " + queueSize + " with " + queuedMsgs + " msgs"); + LogWriterUtils.getLogWriter().info("After " + count + " " + VALUE_SIZE + " byte puts slowrec mode kicked in but the queue filled when its size reached " + queueSize + " with " + queuedMsgs + " msgs"); // make sure we lost a connection to vm0 WaitCriterion ev = new WaitCriterion() { public boolean done() { @@ -760,7 +760,7 @@ public class SlowRecDUnitTest extends CacheTestCase { fail("should have exceeded async-queue-timeout by now"); } } - LogWriterSupport.getLogWriter().info("After " + count + " " + VALUE_SIZE + " byte puts slowrec mode kicked in but the queue filled when its size reached " + queueSize + " with " + queuedMsgs + " msgs"); + LogWriterUtils.getLogWriter().info("After " + count + " " + VALUE_SIZE + " byte puts slowrec mode kicked in but the queue filled when its size reached " + queueSize + " with " + queuedMsgs + " msgs"); // make sure we lost a connection to vm0 WaitCriterion ev = new WaitCriterion() { public boolean done() { @@ -818,7 +818,7 @@ public class SlowRecDUnitTest extends CacheTestCase { public final Object CONTROL_LOCK = new Object(); public void afterCreate(EntryEvent event) { - LogWriterSupport.getLogWriter().info(event.getRegion().getName() + " afterCreate " + event.getKey()); + LogWriterUtils.getLogWriter().info(event.getRegion().getName() + " afterCreate " + event.getKey()); synchronized(this.CONTROL_LOCK) { if (event.getCallbackArgument() != null) { this.callbackArguments.add( @@ -830,7 +830,7 @@ public class SlowRecDUnitTest extends CacheTestCase { processEvent(event); } public void afterUpdate(EntryEvent event) { - LogWriterSupport.getLogWriter().info(event.getRegion().getName() + " afterUpdate " + event.getKey()); + LogWriterUtils.getLogWriter().info(event.getRegion().getName() + " afterUpdate " + event.getKey()); synchronized(this.CONTROL_LOCK) { if (event.getCallbackArgument() != null) { this.callbackArguments.add( @@ -884,14 +884,14 @@ public class SlowRecDUnitTest extends CacheTestCase { } private void processSleep(EntryEvent event) { int sleepMs = ((Integer)event.getNewValue()).intValue(); - LogWriterSupport.getLogWriter().info("[processSleep] sleeping for " + sleepMs); + LogWriterUtils.getLogWriter().info("[processSleep] sleeping for " + sleepMs); try { Thread.sleep(sleepMs); } catch (InterruptedException ignore) {fail("interrupted");} } private void processWait(EntryEvent event) { int sleepMs = ((Integer)event.getNewValue()).intValue(); - LogWriterSupport.getLogWriter().info("[processWait] waiting for " + sleepMs); + LogWriterUtils.getLogWriter().info("[processWait] waiting for " + sleepMs); synchronized(this.CONTROL_LOCK) { try { this.CONTROL_LOCK.wait(sleepMs); @@ -899,7 +899,7 @@ public class SlowRecDUnitTest extends CacheTestCase { } } private void processDisconnect(EntryEvent event) { - LogWriterSupport.getLogWriter().info("[processDisconnect] disconnecting"); + LogWriterUtils.getLogWriter().info("[processDisconnect] disconnecting"); disconnectFromDS(); } }; @@ -920,7 +920,7 @@ public class SlowRecDUnitTest extends CacheTestCase { throw e; } catch (Throwable t) { - LogWriterSupport.getLogWriter().error("Encountered exception: ", t); + LogWriterUtils.getLogWriter().error("Encountered exception: ", t); throw t; } finally { @@ -989,11 +989,11 @@ public class SlowRecDUnitTest extends CacheTestCase { }); // put vm0 cache listener into wait - LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] about to put vm0 into wait"); + LogWriterUtils.getLogWriter().info("[doTestMultipleRegionConflation] about to put vm0 into wait"); r1.put(KEY_WAIT, new Integer(millisToWait)); // build up queue size - LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] building up queue size..."); + LogWriterUtils.getLogWriter().info("[doTestMultipleRegionConflation] building up queue size..."); final Object key = "key"; final int socketBufferSize = getSystem().getConfig().getSocketBufferSize(); final int VALUE_SIZE = socketBufferSize*3; @@ -1006,7 +1006,7 @@ public class SlowRecDUnitTest extends CacheTestCase { r1.put(key, value); } - LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] After " + + LogWriterUtils.getLogWriter().info("[doTestMultipleRegionConflation] After " + count + " puts of size " + VALUE_SIZE + " slowrec mode kicked in with queue size=" + stats.getAsyncQueueSize()); @@ -1064,7 +1064,7 @@ public class SlowRecDUnitTest extends CacheTestCase { CALLBACK_DESTROY, CALLBACK_CREATE, CALLBACK_UPDATE }; // send notify to vm0 - LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] wake up vm0"); + LogWriterUtils.getLogWriter().info("[doTestMultipleRegionConflation] wake up vm0"); getOtherVm().invoke(new SerializableRunnable("Wake up other vm") { public void run() { synchronized(doTestMultipleRegionConflation_R1_Listener.CONTROL_LOCK) { @@ -1074,7 +1074,7 @@ public class SlowRecDUnitTest extends CacheTestCase { }); // wait for queue to be flushed - LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] wait for vm0"); + LogWriterUtils.getLogWriter().info("[doTestMultipleRegionConflation] wait for vm0"); getOtherVm().invoke(new SerializableRunnable("Wait for other vm") { public void run() { try { @@ -1093,12 +1093,12 @@ public class SlowRecDUnitTest extends CacheTestCase { }); // assert values on both listeners - LogWriterSupport.getLogWriter().info("[doTestMultipleRegionConflation] assert callback arguments"); + LogWriterUtils.getLogWriter().info("[doTestMultipleRegionConflation] assert callback arguments"); getOtherVm().invoke(new SerializableRunnable("Assert callback arguments") { public void run() { synchronized(doTestMultipleRegionConflation_R1_Listener.CONTROL_LOCK) { - LogWriterSupport.getLogWriter().info("doTestMultipleRegionConflation_R1_Listener.callbackArguments=" + doTestMultipleRegionConflation_R1_Listener.callbackArguments); - LogWriterSupport.getLogWriter().info("doTestMultipleRegionConflation_R1_Listener.callbackTypes=" + doTestMultipleRegionConflation_R1_Listener.callbackTypes); + LogWriterUtils.getLogWriter().info("doTestMultipleRegionConflation_R1_Listener.callbackArguments=" + doTestMultipleRegionConflation_R1_Listener.callbackArguments); + LogWriterUtils.getLogWriter().info("doTestMultipleRegionConflation_R1_Listener.callbackTypes=" + doTestMultipleRegionConflation_R1_Listener.callbackTypes); assertEquals(doTestMultipleRegionConflation_R1_Listener.callbackArguments.size(), doTestMultipleRegionConflation_R1_Listener.callbackTypes.size()); int i = 0; @@ -1112,8 +1112,8 @@ public class SlowRecDUnitTest extends CacheTestCase { } } synchronized(doTestMultipleRegionConflation_R2_Listener.CONTROL_LOCK) { - LogWriterSupport.getLogWriter().info("doTestMultipleRegionConflation_R2_Listener.callbackArguments=" + doTestMultipleRegionConflation_R2_Listener.callbackArguments); - LogWriterSupport.getLogWriter().info("doTestMultipleRegionConflation_R2_Listener.callbackTypes=" + doTestMultipleRegionConflation_R2_Listener.callbackTypes); + LogWriterUtils.getLogWriter().info("doTestMultipleRegionConflation_R2_Listener.callbackArguments=" + doTestMultipleRegionConflation_R2_Listener.callbackArguments); + LogWriterUtils.getLogWriter().info("doTestMultipleRegionConflation_R2_Listener.callbackTypes=" + doTestMultipleRegionConflation_R2_Listener.callbackTypes); assertEquals(doTestMultipleRegionConflation_R2_Listener.callbackArguments.size(), doTestMultipleRegionConflation_R2_Listener.callbackTypes.size()); int i = 0; @@ -1142,7 +1142,7 @@ public class SlowRecDUnitTest extends CacheTestCase { throw e; } catch (Throwable t) { - LogWriterSupport.getLogWriter().error("Encountered exception: ", t); + LogWriterUtils.getLogWriter().error("Encountered exception: ", t); throw t; } finally { @@ -1188,13 +1188,13 @@ public class SlowRecDUnitTest extends CacheTestCase { }); // put vm0 cache listener into wait - LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] about to put vm0 into wait"); + LogWriterUtils.getLogWriter().info("[testDisconnectCleanup] about to put vm0 into wait"); int millisToWait = 1000 * 60 * 5; // 5 minutes r.put(KEY_WAIT, new Integer(millisToWait)); r.put(KEY_DISCONNECT, KEY_DISCONNECT); // build up queue size - LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] building up queue size..."); + LogWriterUtils.getLogWriter().info("[testDisconnectCleanup] building up queue size..."); final Object key = "key"; final int socketBufferSize = getSystem().getConfig().getSocketBufferSize(); final int VALUE_SIZE = socketBufferSize*3; @@ -1209,7 +1209,7 @@ public class SlowRecDUnitTest extends CacheTestCase { assertFalse(System.currentTimeMillis() >= abortMillis); } - LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] After " + + LogWriterUtils.getLogWriter().info("[testDisconnectCleanup] After " + count + " puts of size " + VALUE_SIZE + " slowrec mode kicked in with queue size=" + stats.getAsyncQueueSize()); @@ -1226,7 +1226,7 @@ public class SlowRecDUnitTest extends CacheTestCase { assertFalse(System.currentTimeMillis() >= abortMillis); } - LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] After " + + LogWriterUtils.getLogWriter().info("[testDisconnectCleanup] After " + count + " puts of size " + VALUE_SIZE + " queue size has reached " + stats.getAsyncQueueSize() + " bytes and number of queues is " + stats.getAsyncQueues() + "."); @@ -1238,7 +1238,7 @@ public class SlowRecDUnitTest extends CacheTestCase { assertTrue(dm.getOtherDistributionManagerIds().size() > others.size()); // send notify to vm0 - LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] wake up vm0"); + LogWriterUtils.getLogWriter().info("[testDisconnectCleanup] wake up vm0"); getOtherVm().invoke(new SerializableRunnable("Wake up other vm") { public void run() { synchronized(doTestDisconnectCleanup_Listener.CONTROL_LOCK) { @@ -1248,7 +1248,7 @@ public class SlowRecDUnitTest extends CacheTestCase { }); // make sure we lost a connection to vm0 - LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] wait for vm0 to disconnect"); + LogWriterUtils.getLogWriter().info("[testDisconnectCleanup] wait for vm0 to disconnect"); WaitCriterion ev = new WaitCriterion() { public boolean done() { return dm.getOtherDistributionManagerIds().size() <= others.size(); @@ -1261,7 +1261,7 @@ public class SlowRecDUnitTest extends CacheTestCase { assertEquals(others, dm.getOtherDistributionManagerIds()); // check free memory... perform wait loop with System.gc - LogWriterSupport.getLogWriter().info("[testDisconnectCleanup] wait for queue cleanup"); + LogWriterUtils.getLogWriter().info("[testDisconnectCleanup] wait for queue cleanup"); ev = new WaitCriterion() { public boolean done() { if (stats.getAsyncQueues() <= initialQueues) { @@ -1296,7 +1296,7 @@ public class SlowRecDUnitTest extends CacheTestCase { throw e; } catch (Throwable t) { - LogWriterSupport.getLogWriter().error("Encountered exception: ", t); + LogWriterUtils.getLogWriter().error("Encountered exception: ", t); throw t; } finally { @@ -1344,12 +1344,12 @@ public class SlowRecDUnitTest extends CacheTestCase { }); // put vm0 cache listener into wait - LogWriterSupport.getLogWriter().info("[testPartialMessage] about to put vm0 into wait"); + LogWriterUtils.getLogWriter().info("[testPartialMessage] about to put vm0 into wait"); final int millisToWait = 1000 * 60 * 5; // 5 minutes r.put(KEY_WAIT, new Integer(millisToWait)); // build up queue size - LogWriterSupport.getLogWriter().info("[testPartialMessage] building up queue size..."); + LogWriterUtils.getLogWriter().info("[testPartialMessage] building up queue size..."); final Object key = "key"; final int socketBufferSize = getSystem().getConfig().getSocketBufferSize(); final int VALUE_SIZE = socketBufferSize*3; @@ -1365,7 +1365,7 @@ public class SlowRecDUnitTest extends CacheTestCase { final int partialId = count; assertEquals(0, stats.getAsyncConflatedMsgs()); - LogWriterSupport.getLogWriter().info("[testPartialMessage] After " + + LogWriterUtils.getLogWriter().info("[testPartialMessage] After " + count + " puts of size " + VALUE_SIZE + " slowrec mode kicked in with queue size=" + stats.getAsyncQueueSize()); @@ -1394,7 +1394,7 @@ public class SlowRecDUnitTest extends CacheTestCase { final int[] expectedArgs = { partialId, conflateId }; // send notify to vm0 - LogWriterSupport.getLogWriter().info("[testPartialMessage] wake up vm0"); + LogWriterUtils.getLogWriter().info("[testPartialMessage] wake up vm0"); getOtherVm().invoke(new SerializableRunnable("Wake up other vm") { public void run() { synchronized(doTestPartialMessage_Listener.CONTROL_LOCK) { @@ -1404,7 +1404,7 @@ public class SlowRecDUnitTest extends CacheTestCase { }); // wait for queue to be flushed - LogWriterSupport.getLogWriter().info("[testPartialMessage] wait for vm0"); + LogWriterUtils.getLogWriter().info("[testPartialMessage] wait for vm0"); getOtherVm().invoke(new SerializableRunnable("Wait for other vm") { public void run() { try { @@ -1430,11 +1430,11 @@ public class SlowRecDUnitTest extends CacheTestCase { }); // assert values on both listeners - LogWriterSupport.getLogWriter().info("[testPartialMessage] assert callback arguments"); + LogWriterUtils.getLogWriter().info("[testPartialMessage] assert callback arguments"); getOtherVm().invoke(new SerializableRunnable("Assert callback arguments") { public void run() { synchronized(doTestPartialMessage_Listener.CONTROL_LOCK) { - LogWriterSupport.getLogWriter().info("[testPartialMessage] " + + LogWriterUtils.getLogWriter().info("[testPartialMessage] " + "doTestPartialMessage_Listener.callbackArguments=" + doTestPartialMessage_Listener.callbackArguments); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java index 1e400c2..7a306f0 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java @@ -83,7 +83,7 @@ import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.IgnoredException; import com.gemstone.gemfire.test.dunit.Invoke; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; @@ -527,7 +527,7 @@ public class TXDistributedDUnitTest extends CacheTestCase { @Override public Properties getDistributedSystemProperties() { Properties p = super.getDistributedSystemProperties(); - p.put("log-level", LogWriterSupport.getDUnitLogLevel()); + p.put("log-level", 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/TXOrderDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java index d014fec..a253f09 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXOrderDUnitTest.java @@ -52,7 +52,7 @@ import com.gemstone.gemfire.cache.util.TransactionListenerAdapter; import com.gemstone.gemfire.distributed.DistributedMember; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; 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.VM; @@ -187,7 +187,7 @@ public class TXOrderDUnitTest extends CacheTestCase { af.addCacheListener(cl1); CacheLoader cl = new CacheLoader() { public Object load(LoaderHelper helper) throws CacheLoaderException { - LogWriterSupport.getLogWriter().info("Loading value:"+helper.getKey()+"_value"); + LogWriterUtils.getLogWriter().info("Loading value:"+helper.getKey()+"_value"); return helper.getKey()+"_value"; } public void close() { @@ -206,7 +206,7 @@ public class TXOrderDUnitTest extends CacheTestCase { af.setScope(Scope.DISTRIBUTED_ACK); CacheListener cl1 = new CacheListenerAdapter() { public void afterCreate(EntryEvent e) { - LogWriterSupport.getLogWriter().info("op:"+e.getOperation().toString()); + LogWriterUtils.getLogWriter().info("op:"+e.getOperation().toString()); assertTrue(!e.getOperation().isLocalLoad()); } }; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java index 9d9529c..fcaaa2d 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java @@ -45,9 +45,9 @@ import com.gemstone.gemfire.internal.AvailablePort; import com.gemstone.gemfire.internal.AvailablePortHelper; import com.gemstone.gemfire.internal.SocketCreator; 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.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.VM; /** @@ -258,7 +258,7 @@ public class DistributedSystemDUnitTest extends DistributedTestCase { public void testSpecificTcpPort() throws Exception { Properties config = new Properties(); int tcpPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); - config.put("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]"); + config.put("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]"); config.setProperty("tcp-port", String.valueOf(tcpPort)); system = (InternalDistributedSystem)DistributedSystem.connect(config); DistributionManager dm = (DistributionManager)system.getDistributionManager(); @@ -286,10 +286,10 @@ public class DistributedSystemDUnitTest extends DistributedTestCase { if (loopback != null) { Properties config = new Properties(); config.put(DistributionConfig.MCAST_PORT_NAME, "0"); - String locators = InetAddress.getLocalHost().getHostName()+":"+DistributedTestSupport.getDUnitLocatorPort(); + String locators = InetAddress.getLocalHost().getHostName()+":"+DistributedTestUtils.getDUnitLocatorPort(); config.put(DistributionConfig.LOCATORS_NAME, locators); config.setProperty(DistributionConfig.BIND_ADDRESS_NAME, loopback.getHostAddress()); - LogWriterSupport.getLogWriter().info("attempting to connect with " + loopback +" and locators=" + locators); + LogWriterUtils.getLogWriter().info("attempting to connect with " + loopback +" and locators=" + locators); try { system = (InternalDistributedSystem)DistributedSystem.connect(config); system.disconnect(); @@ -305,7 +305,7 @@ public class DistributedSystemDUnitTest extends DistributedTestCase { public void testUDPPortRange() throws Exception { Properties config = new Properties(); int unicastPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); - config.put("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]"); + config.put("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]"); // Minimum 3 ports required in range for UDP, FD_SOCK and TcpConduit. config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, ""+unicastPort+"-"+(unicastPort+2)); @@ -319,7 +319,7 @@ public class DistributedSystemDUnitTest extends DistributedTestCase { public void testMembershipPortRangeWithExactThreeValues() throws Exception { Properties config = new Properties(); - config.setProperty("locators", "localhost["+DistributedTestSupport.getDUnitLocatorPort()+"]"); + config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]"); config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, "" + (DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1] - 2) + "-" + (DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1]));
