http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java index fb7f41e..dca0f78 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java @@ -38,7 +38,7 @@ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder; import com.gemstone.gemfire.test.dunit.Assert; 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.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -125,10 +125,10 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase { RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean(); List<String> jvmArgs = runtimeBean.getInputArguments(); - LogWriterSupport.getLogWriter().info("#SB Actual JVM Args : "); + LogWriterUtils.getLogWriter().info("#SB Actual JVM Args : "); for (String jvmArg : jvmArgs) { - LogWriterSupport.getLogWriter().info("#SB JVM " + jvmArg); + LogWriterUtils.getLogWriter().info("#SB JVM " + jvmArg); } InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem(); @@ -142,7 +142,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase { CommandResult cmdResult = executeCommand(command); String resultStr = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("#SB Hiding the defaults\n" + resultStr); + LogWriterUtils.getLogWriter().info("#SB Hiding the defaults\n" + resultStr); assertEquals(true, cmdResult.getStatus().equals(Status.OK)); assertEquals(true, resultStr.contains("G1")); @@ -152,7 +152,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase { cmdResult = executeCommand(command + " --" + CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS + "=false"); resultStr = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("#SB No hiding of defaults\n" + resultStr); + LogWriterUtils.getLogWriter().info("#SB No hiding of defaults\n" + resultStr); assertEquals(true, cmdResult.getStatus().equals(Status.OK)); assertEquals(true, resultStr.contains("is-server")); @@ -281,8 +281,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase { csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "10"); CommandResult cmdResult = executeCommand(csb.getCommandString()); String resultString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("Result\n"); - LogWriterSupport.getLogWriter().info(resultString); + LogWriterUtils.getLogWriter().info("Result\n"); + LogWriterUtils.getLogWriter().info(resultString); assertEquals(true, cmdResult.getStatus().equals(Status.OK)); assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel()); assertEquals(50, config.getLogFileSizeLimit()); @@ -320,8 +320,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase { CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG); CommandResult cmdResult = executeCommand(csb.getCommandString()); String resultAsString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("#SB Result\n"); - LogWriterSupport.getLogWriter().info(resultAsString); + LogWriterUtils.getLogWriter().info("#SB Result\n"); + LogWriterUtils.getLogWriter().info(resultAsString); assertEquals(true, cmdResult.getStatus().equals(Status.ERROR)); assertTrue(resultAsString.contains(CliStrings.ALTER_RUNTIME_CONFIG__RELEVANT__OPTION__MESSAGE)); @@ -329,8 +329,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase { csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "2000000000"); cmdResult = executeCommand(csb.getCommandString()); resultAsString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("#SB Result\n"); - LogWriterSupport.getLogWriter().info(resultAsString); + LogWriterUtils.getLogWriter().info("#SB Result\n"); + LogWriterUtils.getLogWriter().info(resultAsString); assertEquals(true, cmdResult.getStatus().equals(Status.ERROR)); } @@ -365,8 +365,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase { csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "10"); CommandResult cmdResult = executeCommand(csb.getCommandString()); String resultString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("#SB Result\n"); - LogWriterSupport.getLogWriter().info(resultString); + LogWriterUtils.getLogWriter().info("#SB Result\n"); + LogWriterUtils.getLogWriter().info(resultString); assertEquals(true, cmdResult.getStatus().equals(Status.OK)); assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel()); assertEquals(50, config.getLogFileSizeLimit());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java index 9b5aa66..9f6b141 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java @@ -42,7 +42,7 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult; import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -234,7 +234,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas ObjectName queryExpON = new ObjectName(queryExp); return !(mbeanServer.queryNames(null, queryExpON).isEmpty()); } catch (MalformedObjectNameException mone) { - LogWriterSupport.getLogWriter().error(mone); + LogWriterUtils.getLogWriter().error(mone); fail(mone.getMessage()); return false; } @@ -252,36 +252,36 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas // Test failure when region not found String command = "destroy region --name=DOESNOTEXIST"; - LogWriterSupport.getLogWriter().info("testDestroyRegion command=" + command); + LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command); CommandResult cmdResult = executeCommand(command); String strr = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testDestroyRegion strr=" + strr); + LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr); assertTrue(stringContainsLine(strr, "Could not find.*\"DOESNOTEXIST\".*")); assertEquals(Result.Status.ERROR, cmdResult.getStatus()); // Test unable to destroy with co-location command = "destroy region --name=/Customer"; - LogWriterSupport.getLogWriter().info("testDestroyRegion command=" + command); + LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command); cmdResult = executeCommand(command); strr = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testDestroyRegion strr=" + strr); + LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr); assertEquals(Result.Status.ERROR, cmdResult.getStatus()); // Test success command = "destroy region --name=/Order"; - LogWriterSupport.getLogWriter().info("testDestroyRegion command=" + command); + LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command); cmdResult = executeCommand(command); strr = commandResultToString(cmdResult); assertTrue(stringContainsLine(strr, ".*Order.*destroyed successfully.*")); - LogWriterSupport.getLogWriter().info("testDestroyRegion strr=" + strr); + LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr); assertEquals(Result.Status.OK, cmdResult.getStatus()); command = "destroy region --name=/Customer"; - LogWriterSupport.getLogWriter().info("testDestroyRegion command=" + command); + LogWriterUtils.getLogWriter().info("testDestroyRegion command=" + command); cmdResult = executeCommand(command); strr = commandResultToString(cmdResult); assertTrue(stringContainsLine(strr, ".*Customer.*destroyed successfully.*")); - LogWriterSupport.getLogWriter().info("testDestroyRegion strr=" + strr); + LogWriterUtils.getLogWriter().info("testDestroyRegion strr=" + strr); assertEquals(Result.Status.OK, cmdResult.getStatus()); } @@ -290,19 +290,19 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas createDefaultSetup(null); String command = CliStrings.CREATE_REGION + " --" + CliStrings.CREATE_REGION__REGION + "=" + this.region46391 + " --" + CliStrings.CREATE_REGION__REGIONSHORTCUT + "=REPLICATE"; - LogWriterSupport.getLogWriter().info("testCreateRegion46391 create region command=" + command); + LogWriterUtils.getLogWriter().info("testCreateRegion46391 create region command=" + command); CommandResult cmdResult = executeCommand(command); assertEquals(Result.Status.OK, cmdResult.getStatus()); command = CliStrings.PUT + " --" + CliStrings.PUT__KEY + "=k1" + " --" + CliStrings.PUT__VALUE + "=k1" + " --" + CliStrings.PUT__REGIONNAME + "=" + this.region46391; - LogWriterSupport.getLogWriter().info("testCreateRegion46391 put command=" + command); + LogWriterUtils.getLogWriter().info("testCreateRegion46391 put command=" + command); CommandResult cmdResult2 = executeCommand(command); assertEquals(Result.Status.OK, cmdResult2.getStatus()); - LogWriterSupport.getLogWriter().info("testCreateRegion46391 cmdResult2=" + commandResultToString(cmdResult2)); + LogWriterUtils.getLogWriter().info("testCreateRegion46391 cmdResult2=" + commandResultToString(cmdResult2)); String str1 = "Result : true"; String str2 = "Key : k1"; String str3 = "Key Class : java.lang.String"; @@ -815,7 +815,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas ObjectName queryExpON = new ObjectName(queryExp); return !(mbeanServer.queryNames(null, queryExpON).isEmpty()); } catch (MalformedObjectNameException mone) { - LogWriterSupport.getLogWriter().error(mone); + LogWriterUtils.getLogWriter().error(mone); fail(mone.getMessage()); return false; } @@ -1001,7 +1001,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas ObjectName queryExpON = new ObjectName(queryExp); return !(mbeanServer.queryNames(null, queryExpON).isEmpty()); } catch (MalformedObjectNameException mone) { - LogWriterSupport.getLogWriter().error(mone); + LogWriterUtils.getLogWriter().error(mone); fail(mone.getMessage()); return false; } @@ -1034,7 +1034,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas commandStringBuilder = new CommandStringBuilder(CliStrings.DESTROY_REGION); commandStringBuilder.addOption(CliStrings.DESTROY_REGION__REGION, regionName); cmdResult = executeCommand(commandStringBuilder.toString()); - LogWriterSupport.getLogWriter().info("#SB" + commandResultToString(cmdResult)); + LogWriterUtils.getLogWriter().info("#SB" + commandResultToString(cmdResult)); assertEquals(Result.Status.OK, cmdResult.getStatus()); // Make sure the region was removed from the shared config @@ -1087,7 +1087,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas executeCommand("undeploy --jar=" + fileToDelete.getName()); } } catch (IOException e) { - LogWriterSupport.getLogWriter().error("Unable to delete file", e); + LogWriterUtils.getLogWriter().error("Unable to delete file", e); } } this.filesToBeDeleted.clear(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java index e9a3de8..826f128 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java @@ -48,7 +48,7 @@ import com.gemstone.gemfire.management.internal.cli.shell.Gfsh; import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -372,16 +372,16 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { } }); String command = "validate offline-disk-store --name=" + diskStoreName1 + " --disk-dirs=" + diskStoreDir.getAbsolutePath(); - LogWriterSupport.getLogWriter().info("testValidateDiskStore command: " + command); + LogWriterUtils.getLogWriter().info("testValidateDiskStore command: " + command); CommandResult cmdResult = executeCommand(command); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testValidateDiskStore cmdResult is stringResult " + stringResult); + LogWriterUtils.getLogWriter().info("testValidateDiskStore cmdResult is stringResult " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); assertTrue(stringResult.contains("Total number of region entries in this disk store is")); } else { - LogWriterSupport.getLogWriter().info("testValidateDiskStore cmdResult is null"); + LogWriterUtils.getLogWriter().info("testValidateDiskStore cmdResult is null"); fail("Did not get CommandResult in testValidateDiskStore"); } } @@ -426,7 +426,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { } }); String command = "export offline-disk-store --name=" + diskStoreName1 + " --disk-dirs=" + diskStoreDir.getAbsolutePath() + " --dir=" + exportDir; - LogWriterSupport.getLogWriter().info("testExportDiskStore command" + command); + LogWriterUtils.getLogWriter().info("testExportDiskStore command" + command); CommandResult cmdResult = executeCommand(command); if (cmdResult != null) { assertEquals(Result.Status.OK, cmdResult.getStatus()); @@ -435,7 +435,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { SnapshotTestUtil.checkSnapshotEntries(exportDir, entries, diskStoreName1, region2); } else { - LogWriterSupport.getLogWriter().info("testExportOfflineDiskStore cmdResult is null"); + LogWriterUtils.getLogWriter().info("testExportOfflineDiskStore cmdResult is null"); fail("Did not get CommandResult in testExportOfflineDiskStore"); } } @@ -667,7 +667,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { CommandResult cmdResult = executeCommand(commandString); String resultString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("#SB command output : \n" + resultString); + LogWriterUtils.getLogWriter().info("#SB command output : \n" + resultString); assertEquals(true, Result.Status.OK.equals(cmdResult.getStatus())); assertEquals(true, resultString.contains("concurrencyLevel=5")); assertEquals(true, resultString.contains("lruAction=local-destroy")); @@ -698,7 +698,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { cmdResult = executeCommand(commandString); resultString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("command output : \n" + resultString); + LogWriterUtils.getLogWriter().info("command output : \n" + resultString); assertEquals(true, Result.Status.OK.equals(cmdResult.getStatus())); Object postDestroyValue = vm1.invoke(new SerializableCallable() { @@ -725,7 +725,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { cmdResult = executeCommand(commandString); resultString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("Alter DiskStore with wrong remove option : \n" + resultString); + LogWriterUtils.getLogWriter().info("Alter DiskStore with wrong remove option : \n" + resultString); assertEquals(true, Result.Status.ERROR.equals(cmdResult.getStatus())); filesToBeDeleted.add(diskDirName); @@ -792,7 +792,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { CommandResult cmdResult = executeCommand(commandString); String resultAsString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("Result from full backup : \n" + resultAsString); + LogWriterUtils.getLogWriter().info("Result from full backup : \n" + resultAsString); assertEquals(Result.Status.OK, cmdResult.getStatus()); assertEquals(true, resultAsString.contains("Manager")); assertEquals(true, resultAsString.contains(vm1Name)); @@ -822,7 +822,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { cmdResult = executeCommand(csb.toString()); resultAsString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("Result from incremental backup : \n" + resultAsString); + LogWriterUtils.getLogWriter().info("Result from incremental backup : \n" + resultAsString); assertEquals(Result.Status.OK, cmdResult.getStatus()); assertEquals(true, resultAsString.contains("Manager")); @@ -1149,7 +1149,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase { try { FileUtil.delete(new File(path)); } catch (IOException e) { - LogWriterSupport.getLogWriter().error("Unable to delete file", e); + LogWriterUtils.getLogWriter().error("Unable to delete file", e); } } this.filesToBeDeleted.clear(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java index 494890e..7378ada 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java @@ -32,7 +32,7 @@ import com.gemstone.gemfire.management.internal.cli.json.GfJsonException; import com.gemstone.gemfire.management.internal.cli.result.CommandResult; import com.gemstone.gemfire.management.internal.cli.result.TabularResultData; 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; @@ -120,11 +120,11 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { e.printStackTrace(); } String command = "execute function --id=" + function.getId() + " --region=" + "/" + "RegionOne"; - LogWriterSupport.getLogWriter().info("testExecuteFunctionWithNoRegionOnManager command : " + command); + LogWriterUtils.getLogWriter().info("testExecuteFunctionWithNoRegionOnManager command : " + command); CommandResult cmdResult = executeCommand(command); if (cmdResult != null) { String strCmdResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testExecuteFunctionWithNoRegionOnManager stringResult : " + strCmdResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionWithNoRegionOnManager stringResult : " + strCmdResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); assertTrue(strCmdResult.contains("Execution summary")); } else { @@ -152,13 +152,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { }); String command = "execute function --id=" + function.getId() + " --region=" + REGION_NAME; - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnRegion command=" + command); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegion command=" + command); CommandResult cmdResult = executeCommand(command); if (cmdResult != null) { assertEquals(Result.Status.OK, cmdResult.getStatus()); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnRegion cmdResult=" + cmdResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegion cmdResult=" + cmdResult); String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnRegion stringResult=" + stringResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegion stringResult=" + stringResult); assert (stringResult.contains("Execution summary")); } else { fail("testExecuteFunctionOnRegion did not return CommandResult"); @@ -195,7 +195,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { if (bean == null) { return false; } else { - LogWriterSupport.getLogWriter().info("Probing for checkRegionMBeans testExecuteFunctionOnRegionBug51480 finished"); + LogWriterUtils.getLogWriter().info("Probing for checkRegionMBeans testExecuteFunctionOnRegionBug51480 finished"); return true; } } @@ -228,13 +228,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { String command = "execute function --id=" + function.getId() + " --region=" + REGION_ONE; - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnRegionBug51480 command=" + command); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegionBug51480 command=" + command); CommandResult cmdResult = executeCommand(command); if (cmdResult != null) { - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnRegionBug51480 cmdResult=" + cmdResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegionBug51480 cmdResult=" + cmdResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnRegionBug51480 stringResult=" + stringResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegionBug51480 stringResult=" + stringResult); assert (stringResult.contains("Execution summary")); } else { fail("testExecuteFunctionOnRegionBug51480 did not return CommandResult"); @@ -263,12 +263,12 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { }); String command = "execute function --id=" + function.getId() + " --member=" + vm1MemberId; - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnMember command=" + command); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMember command=" + command); CommandResult cmdResult = executeCommand(command); assertEquals(Result.Status.OK, cmdResult.getStatus()); String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnMember stringResult:" + stringResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMember stringResult:" + stringResult); assertTrue(stringResult.contains("Execution summary")); } @@ -292,13 +292,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { } }); String command = "execute function --id=" + function.getId(); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnMembers command=" + command); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembers command=" + command); CommandResult cmdResult = executeCommand(command); if (cmdResult != null) { assertEquals(Result.Status.OK, cmdResult.getStatus()); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnMembers cmdResult:" + cmdResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembers cmdResult:" + cmdResult); String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnMembers stringResult:" + stringResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembers stringResult:" + stringResult); assertTrue(stringResult.contains("Execution summary")); } else { fail("testExecuteFunctionOnMembers did not return CommandResult"); @@ -326,13 +326,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { String command = "execute function --id=" + function.getId() + " --arguments=arg1,arg2"; - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnMembersWithArgs command=" + command); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembersWithArgs command=" + command); CommandResult cmdResult = executeCommand(command); if (cmdResult != null) { assertEquals(Result.Status.OK, cmdResult.getStatus()); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnMembersWithArgs cmdResult:" + cmdResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembersWithArgs cmdResult:" + cmdResult); String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnMembersWithArgs stringResult:" + stringResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembersWithArgs stringResult:" + stringResult); assertTrue(stringResult.contains("Execution summary")); assertTrue(stringResult.contains("arg1")); } else { @@ -388,13 +388,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { }); String command = "execute function --id=" + TestFunction.TEST_FUNCTION1 + " --groups=Group1,Group2"; - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnGroups command=" + command); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnGroups command=" + command); CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnGroups cmdResult=" + cmdResult); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnGroups cmdResult=" + cmdResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); TabularResultData resultData = (TabularResultData) cmdResult.getResultData(); List<String> members = resultData.retrieveAllValues("Member ID/Name"); - LogWriterSupport.getLogWriter().info("testExecuteFunctionOnGroups members=" + members); + LogWriterUtils.getLogWriter().info("testExecuteFunctionOnGroups members=" + members); assertTrue(members.size() == 2 && members.contains(vm1id) && members.contains(vm2id)); } @@ -406,12 +406,12 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { final VM vm1 = Host.getHost(0).getVM(1); final String vm1MemberId = (String) vm1.invoke(FunctionCommandsDUnitTest.class, "getMemberId"); String command = "destroy function --id=" + function.getId() + " --member=" + vm1MemberId; - LogWriterSupport.getLogWriter().info("testDestroyOnMember command=" + command); + LogWriterUtils.getLogWriter().info("testDestroyOnMember command=" + command); CommandResult cmdResult = executeCommand(command); if (cmdResult != null) { String strCmdResult = commandResultToString(cmdResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); - LogWriterSupport.getLogWriter().info("testDestroyOnMember strCmdResult=" + strCmdResult); + LogWriterUtils.getLogWriter().info("testDestroyOnMember strCmdResult=" + strCmdResult); assertTrue(strCmdResult.contains("Destroyed TestFunction1 Successfully")); } else { fail("testDestroyOnMember failed as did not get CommandResult"); @@ -464,14 +464,14 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase { }); String command = "destroy function --id=" + TestFunction.TEST_FUNCTION1 + " --groups=Group1,Group2"; - LogWriterSupport.getLogWriter().info("testDestroyOnGroups command=" + command); + LogWriterUtils.getLogWriter().info("testDestroyOnGroups command=" + command); CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testDestroyOnGroups cmdResult=" + cmdResult); + LogWriterUtils.getLogWriter().info("testDestroyOnGroups cmdResult=" + cmdResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); String content = null; try { content = cmdResult.getContent().get("message").toString(); - LogWriterSupport.getLogWriter().info("testDestroyOnGroups content = " + content); + LogWriterUtils.getLogWriter().info("testDestroyOnGroups content = " + content); } catch (GfJsonException e) { fail("testDestroyOnGroups exception=" + e); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java index 2a85e40..d6719d1 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java @@ -57,7 +57,7 @@ import com.gemstone.gemfire.management.internal.cli.result.TabularResultData; import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.IgnoredException; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; @@ -144,29 +144,29 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { RegionFactory regionFactory = cache.createRegionFactory(RegionShortcut.REPLICATE); Region dataRegion = regionFactory.create(DATA_REGION_NAME); assertNotNull(dataRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataRegion); dataRegion = dataRegion.createSubregion(DATA_REGION_NAME_CHILD_1, dataRegion.getAttributes()); assertNotNull(dataRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataRegion); dataRegion = dataRegion.createSubregion(DATA_REGION_NAME_CHILD_1_2, dataRegion.getAttributes()); assertNotNull(dataRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataRegion); dataRegion = regionFactory.create(DATA_REGION_NAME_VM1); assertNotNull(dataRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataRegion); PartitionAttributes partitionAttrs = new PartitionAttributesFactory().setRedundantCopies(2).create(); RegionFactory<Object, Object> partitionRegionFactory = cache.createRegionFactory(RegionShortcut.PARTITION); partitionRegionFactory.setPartitionAttributes(partitionAttrs); Region dataParRegion = partitionRegionFactory.create(DATA_PAR_REGION_NAME); assertNotNull(dataParRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataParRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataParRegion); dataParRegion = partitionRegionFactory.create(DATA_PAR_REGION_NAME_VM1); assertNotNull(dataParRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataParRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataParRegion); } }); @@ -177,19 +177,19 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { RegionFactory regionFactory = cache.createRegionFactory(RegionShortcut.REPLICATE); Region dataRegion = regionFactory.create(DATA_REGION_NAME); assertNotNull(dataRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataRegion); dataRegion = dataRegion.createSubregion(DATA_REGION_NAME_CHILD_1, dataRegion.getAttributes()); assertNotNull(dataRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataRegion); dataRegion = dataRegion.createSubregion(DATA_REGION_NAME_CHILD_1_2, dataRegion.getAttributes()); assertNotNull(dataRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataRegion); dataRegion = regionFactory.create(DATA_REGION_NAME_VM2); assertNotNull(dataRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataRegion); PartitionAttributes partitionAttrs = new PartitionAttributesFactory().setRedundantCopies(2).create(); @@ -197,18 +197,18 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { partitionRegionFactory.setPartitionAttributes(partitionAttrs); Region dataParRegion = partitionRegionFactory.create(DATA_PAR_REGION_NAME); assertNotNull(dataParRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataParRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataParRegion); dataParRegion = partitionRegionFactory.create(DATA_PAR_REGION_NAME_VM2); assertNotNull(dataParRegion); - LogWriterSupport.getLogWriter().info("Created Region " + dataParRegion); + LogWriterUtils.getLogWriter().info("Created Region " + dataParRegion); } }); final String vm1MemberId = (String) vm1.invoke(GemfireDataCommandsDUnitTest.class, "getMemberId"); final String vm2MemberId = (String) vm2.invoke(GemfireDataCommandsDUnitTest.class, "getMemberId"); - LogWriterSupport.getLogWriter().info("Vm1 ID : " + vm1MemberId); - LogWriterSupport.getLogWriter().info("Vm2 ID : " + vm2MemberId); + LogWriterUtils.getLogWriter().info("Vm1 ID : " + vm1MemberId); + LogWriterUtils.getLogWriter().info("Vm2 ID : " + vm2MemberId); final VM manager = Host.getHost(0).getVM(0); @@ -224,10 +224,10 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { ManagerMXBean bean1 = service.getManagerMXBean(); DistributedRegionMXBean bean2 = service.getDistributedRegionMXBean(DATA_REGION_NAME_PATH); if (bean1 == null) { - LogWriterSupport.getLogWriter().info("Still probing for ManagerMBean"); + LogWriterUtils.getLogWriter().info("Still probing for ManagerMBean"); return false; } else { - LogWriterSupport.getLogWriter().info("Still probing for DistributedRegionMXBean=" + bean2); + LogWriterUtils.getLogWriter().info("Still probing for DistributedRegionMXBean=" + bean2); return (bean2 != null); } } @@ -268,7 +268,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { } if (!flag) { - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Still probing for regionMbeans " + DATA_REGION_NAME_PATH + "=" + beans[0] + " " + DATA_REGION_NAME_VM1_PATH + "=" + beans[1] + " " + DATA_REGION_NAME_VM2_PATH + "=" + beans[2] + " " + DATA_PAR_REGION_NAME_PATH + "=" + beans[3] + " " + DATA_PAR_REGION_NAME_VM1_PATH + "=" + beans[4] + " " + DATA_PAR_REGION_NAME_VM2_PATH + "=" + beans[5] + " " //+ DATA_REGION_NAME_CHILD_1_PATH // +"="+ beans[6] + " " + DATA_REGION_NAME_CHILD_1_2_PATH @@ -276,7 +276,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { ); return false; } else { - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Probing complete for regionMbeans " + DATA_REGION_NAME_PATH + "=" + beans[0] + " " + DATA_REGION_NAME_VM1_PATH + "=" + beans[1] + " " + DATA_REGION_NAME_VM2_PATH + "=" + beans[2] + " " + DATA_PAR_REGION_NAME_PATH + "=" + beans[3] + " " + DATA_PAR_REGION_NAME_VM1_PATH + "=" + beans[4] + " " + DATA_PAR_REGION_NAME_VM2_PATH + "=" + beans[5] + " " //+ DATA_REGION_NAME_CHILD_1_PATH // +"="+ beans[6] + " " + DATA_REGION_NAME_CHILD_1_2_PATH @@ -306,7 +306,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { bean = service.getDistributedRegionMXBean(region); assertNotNull(bean); String[] membersName = bean.getMembers(); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "Members Array for region " + region + " : " + StringUtils.objectToString(membersName, true, 10)); if (bean.getMemberCount() < 1) fail( "Even after waiting mbean reports number of member hosting region " + DATA_REGION_NAME_VM1_PATH + " is less than one"); @@ -371,7 +371,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { query = query.replace("?" + i, r); i++; } - LogWriterSupport.getLogWriter().info("Checking members for query : " + query); + LogWriterUtils.getLogWriter().info("Checking members for query : " + query); QCompiler compiler = new QCompiler(); Set<String> regionsInQuery = null; try { @@ -379,11 +379,11 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { Set regionSet = new HashSet(); compiledQuery.getRegionsInQuery(regionSet, null);//GFSH ENV VARIBLES regionsInQuery = Collections.unmodifiableSet(regionSet); - LogWriterSupport.getLogWriter().info("Region in query : " + regionsInQuery); + LogWriterUtils.getLogWriter().info("Region in query : " + regionsInQuery); if (regionsInQuery.size() > 0) { Set<DistributedMember> members = DataCommands.getQueryRegionsAssociatedMembers(regionsInQuery, cache, returnAll); - LogWriterSupport.getLogWriter().info("Members for Region in query : " + members); + LogWriterUtils.getLogWriter().info("Members for Region in query : " + members); if (expectedMembers != -1) { assertNotNull(members); assertEquals(expectedMembers, members.size()); @@ -455,7 +455,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { MemberMXBean member = service.getMemberMXBean(); String cmdResult = member.processCommand(query); assertNotNull(cmdResult); - LogWriterSupport.getLogWriter().info("Text Command Output : " + cmdResult); + LogWriterUtils.getLogWriter().info("Text Command Output : " + cmdResult); } }); } @@ -552,15 +552,15 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { Double doubleKey = Double.valueOf("12432.235425"); Double doubleValue = Double.valueOf("111111.111111"); - LogWriterSupport.getLogWriter().info("Testing Byte Wrappers"); + LogWriterUtils.getLogWriter().info("Testing Byte Wrappers"); testGetPutLocateEntryFromShellAndGemfire(byteKey, byteValue, Byte.class, true, true); - LogWriterSupport.getLogWriter().info("Testing Short Wrappers"); + LogWriterUtils.getLogWriter().info("Testing Short Wrappers"); testGetPutLocateEntryFromShellAndGemfire(shortKey, shortValue, Short.class, true, true); - LogWriterSupport.getLogWriter().info("Testing Integer Wrappers"); + LogWriterUtils.getLogWriter().info("Testing Integer Wrappers"); testGetPutLocateEntryFromShellAndGemfire(integerKey, integerValue, Integer.class, true, true); - LogWriterSupport.getLogWriter().info("Testing Float Wrappers"); + LogWriterUtils.getLogWriter().info("Testing Float Wrappers"); testGetPutLocateEntryFromShellAndGemfire(floatKey, flaotValue, Float.class, true, true); - LogWriterSupport.getLogWriter().info("Testing Double Wrappers"); + LogWriterUtils.getLogWriter().info("Testing Double Wrappers"); testGetPutLocateEntryFromShellAndGemfire(doubleKey, doubleValue, Double.class, true, true); } @@ -762,7 +762,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { try { for (String col : expectedCols) { boolean found = false; - LogWriterSupport.getLogWriter().info("Validating column " + col); + LogWriterUtils.getLogWriter().info("Validating column " + col); for (int i = 0; i < array.size(); i++) { String header = (String) array.get(i); if (col.equals(header)) found = true; @@ -783,7 +783,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { try { for (String col : expectedCols) { boolean found = false; - LogWriterSupport.getLogWriter().info("Validating column " + col); + LogWriterUtils.getLogWriter().info("Validating column " + col); for (int i = 0; i < array.size(); i++) { String header = (String) array.get(i); if (col.equals(header)) found = true; @@ -817,7 +817,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { assertEquals(cols.length, array.size()); for (String col : cols) { boolean found = false; - LogWriterSupport.getLogWriter().info("Validating column " + col); + LogWriterUtils.getLogWriter().info("Validating column " + col); for (int i = 0; i < array.size(); i++) { String header = (String) array.get(i); if (col.equals(header)) found = true; @@ -1279,7 +1279,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { String valueJson = valueTemplate.replaceAll("\\?1", population); valueJson = valueJson.replaceAll("\\?2", area); valueJson = valueJson.replaceAll("\\?", keyString); - LogWriterSupport.getLogWriter().info("Getting key with json key : " + keyJson); + LogWriterUtils.getLogWriter().info("Getting key with json key : " + keyJson); command = command + " " + "--key=" + keyJson + " --region=" + DATA_REGION_NAME_PATH + " --key-class=" + Key1.class.getCanonicalName(); command = command + " --value-class=" + Value2.class.getCanonicalName(); CommandResult cmdResult = executeCommand(command); @@ -1308,7 +1308,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { String valueJson = valueTemplate.replaceAll("\\?1", population); valueJson = valueJson.replaceAll("\\?2", area); valueJson = valueJson.replaceAll("\\?", keyString); - LogWriterSupport.getLogWriter().info("Getting key with json key : " + keyJson); + LogWriterUtils.getLogWriter().info("Getting key with json key : " + keyJson); command = command + " " + "--key=" + keyJson + " --region=" + DATA_REGION_NAME_PATH + " --key-class=" + Key1.class.getCanonicalName(); command = command + " --value-class=" + Value2.class.getCanonicalName(); CommandResult cmdResult = executeCommand(command); @@ -1345,8 +1345,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { String valueJson = valueTemplate.replaceAll("\\?1", population); valueJson = valueJson.replaceAll("\\?2", area); valueJson = valueJson.replaceAll("\\?", keyString); - LogWriterSupport.getLogWriter().info("Putting key with json key : " + keyJson); - LogWriterSupport.getLogWriter().info("Putting key with json valye : " + valueJson); + LogWriterUtils.getLogWriter().info("Putting key with json key : " + keyJson); + LogWriterUtils.getLogWriter().info("Putting key with json valye : " + valueJson); command = command + " " + "--key=" + keyJson + " --value=" + valueJson + " --region=" + DATA_REGION_NAME_PATH; command = command + " --key-class=" + Key1.class.getCanonicalName() + " --value-class=" + Value2.class.getCanonicalName(); ; @@ -1374,8 +1374,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { valueJson = valueJson.replaceAll("\\?set", set); valueJson = valueJson.replaceAll("\\?map", map); - LogWriterSupport.getLogWriter().info("Putting key with json key : " + keyJson); - LogWriterSupport.getLogWriter().info("Putting key with json valye : " + valueJson); + LogWriterUtils.getLogWriter().info("Putting key with json key : " + keyJson); + LogWriterUtils.getLogWriter().info("Putting key with json valye : " + valueJson); command = command + " " + "--key=" + keyJson + " --value=" + valueJson + " --region=" + DATA_REGION_NAME_PATH; command = command + " --key-class=" + Key1.class.getCanonicalName() + " --value-class=" + Car.class.getCanonicalName(); ; @@ -1485,7 +1485,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { String command = "remove"; String keyString = keyPrefix + i; String keyJson = keyTemplate.replaceAll("\\?", keyString); - LogWriterSupport.getLogWriter().info("Removing key with json key : " + keyJson); + LogWriterUtils.getLogWriter().info("Removing key with json key : " + keyJson); command = command + " " + "--key=" + keyJson + " --region=" + DATA_REGION_NAME_PATH + " --key-class=" + Key1.class.getCanonicalName(); CommandResult cmdResult = executeCommand(command); printCommandOutput(cmdResult); @@ -1566,8 +1566,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { CommandResult cmdResult = executeCommand(commandString); String resultAsString = commandResultToString(cmdResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); - LogWriterSupport.getLogWriter().info("Command Output"); - LogWriterSupport.getLogWriter().info(resultAsString); + LogWriterUtils.getLogWriter().info("Command Output"); + LogWriterUtils.getLogWriter().info(resultAsString); vm1.invoke(new SerializableRunnable() { public void run() { @@ -1590,8 +1590,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { cmdResult = executeCommand(commandString); resultAsString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("Result of import data"); - LogWriterSupport.getLogWriter().info(resultAsString); + LogWriterUtils.getLogWriter().info("Result of import data"); + LogWriterUtils.getLogWriter().info(resultAsString); assertEquals(Result.Status.OK, cmdResult.getStatus()); /** @@ -1616,8 +1616,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { cmdResult = executeCommand(commandString); resultAsString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("Result of import data with wrong region name"); - LogWriterSupport.getLogWriter().info(resultAsString); + LogWriterUtils.getLogWriter().info("Result of import data with wrong region name"); + LogWriterUtils.getLogWriter().info(resultAsString); assertEquals(Result.Status.ERROR, cmdResult.getStatus()); csb = new CommandStringBuilder(CliStrings.IMPORT_DATA); @@ -1628,8 +1628,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { cmdResult = executeCommand(commandString); resultAsString = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("Result of import data with wrong file"); - LogWriterSupport.getLogWriter().info(resultAsString); + LogWriterUtils.getLogWriter().info("Result of import data with wrong file"); + LogWriterUtils.getLogWriter().info(resultAsString); assertEquals(Result.Status.ERROR, cmdResult.getStatus()); } finally { @@ -1689,7 +1689,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { final DistributedRegionMXBean bean = service.getDistributedRegionMXBean( Region.SEPARATOR + REBALANCE_REGION_NAME); if (bean == null) { - LogWriterSupport.getLogWriter().info("Still probing for checkRegionMBeans ManagerMBean"); + LogWriterUtils.getLogWriter().info("Still probing for checkRegionMBeans ManagerMBean"); return false; } else { // verify that bean is proper before executing tests @@ -1719,13 +1719,13 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { //check if DistributedRegionMXBean is available so that command will not fail final VM manager = Host.getHost(0).getVM(0); manager.invoke(checkRegionMBeans); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForTimeOut verified Mbean and executin command"); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOut verified Mbean and executin command"); String command = "rebalance --time-out=1"; CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForTimeOut just after executing " + cmdResult); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOut just after executing " + cmdResult); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForTimeOut stringResult : " + stringResult); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOut stringResult : " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); } else { fail("testRebalanceCommandForTimeOut failed as did not get CommandResult"); @@ -1739,16 +1739,16 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { final VM manager = Host.getHost(0).getVM(0); manager.invoke(checkRegionMBeans); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForTimeOutForRegion verified Mbean and executin command"); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOutForRegion verified Mbean and executin command"); String command = "rebalance --time-out=1 --include-region=" + "/" + REBALANCE_REGION_NAME; CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForTimeOutForRegion just after executing " + cmdResult); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOutForRegion just after executing " + cmdResult); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForTimeOutForRegion stringResult : " + stringResult); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOutForRegion stringResult : " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); } else { fail("testRebalanceCommandForTimeOut failed as did not get CommandResult"); @@ -1762,13 +1762,13 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { final VM manager = Host.getHost(0).getVM(0); manager.invoke(checkRegionMBeans); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForSimulate verified Mbean and executin command"); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulate verified Mbean and executin command"); String command = "rebalance --simulate=true --include-region=" + "/" + REBALANCE_REGION_NAME; CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForSimulate just after executing " + cmdResult); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulate just after executing " + cmdResult); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForSimulate stringResult : " + stringResult); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulate stringResult : " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); } else { fail("testRebalanceCommandForSimulate failed as did not get CommandResult"); @@ -1782,16 +1782,16 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { final VM manager = Host.getHost(0).getVM(0); manager.invoke(checkRegionMBeans); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember verified Mbean and executin command"); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember verified Mbean and executin command"); String command = "rebalance --simulate=true"; CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember just after executing " + cmdResult); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember just after executing " + cmdResult); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember stringResult : " + stringResult); + LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember stringResult : " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); } else { fail("testRebalanceCommandForSimulateWithNoMember failed as did not get CommandResult"); @@ -1805,13 +1805,13 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { //check if DistributedRegionMXBean is available so that command will not fail final VM manager = Host.getHost(0).getVM(0); manager.invoke(checkRegionMBeans); - LogWriterSupport.getLogWriter().info("testRebalanceForIncludeRegionFunction verified Mbean and executin command"); + LogWriterUtils.getLogWriter().info("testRebalanceForIncludeRegionFunction verified Mbean and executin command"); String command = "rebalance --include-region=" + "/" + REBALANCE_REGION_NAME + ",/" + REBALANCE_REGION2_NAME; CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testRebalanceForIncludeRegionFunction just after executing " + cmdResult); + LogWriterUtils.getLogWriter().info("testRebalanceForIncludeRegionFunction just after executing " + cmdResult); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testRebalanceForIncludeRegionFunction stringResult : " + stringResult); + LogWriterUtils.getLogWriter().info("testRebalanceForIncludeRegionFunction stringResult : " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); } else { fail("testRebalanceForIncludeRegionFunction failed as did not get CommandResult"); @@ -1824,17 +1824,17 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { final VM manager = Host.getHost(0).getVM(0); manager.invoke(checkRegionMBeans); - LogWriterSupport.getLogWriter().info("testSimulateForEntireDS verified Mbean and executin command"); + LogWriterUtils.getLogWriter().info("testSimulateForEntireDS verified Mbean and executin command"); String command = "rebalance --simulate=true"; CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testSimulateForEntireDS just after executing " + cmdResult); + LogWriterUtils.getLogWriter().info("testSimulateForEntireDS just after executing " + cmdResult); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testSimulateForEntireDS stringResult : " + stringResult); + LogWriterUtils.getLogWriter().info("testSimulateForEntireDS stringResult : " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); } else { fail("testRebalanceForIncludeRegionFunction failed as did not get CommandResult"); @@ -1846,13 +1846,13 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { //check if DistributedRegionMXBean is available so that command will not fail final VM manager = Host.getHost(0).getVM(0); manager.invoke(checkRegionMBeans); - LogWriterSupport.getLogWriter().info("testRebalanceForEntireDS verified Mbean and executin command"); + LogWriterUtils.getLogWriter().info("testRebalanceForEntireDS verified Mbean and executin command"); String command = "rebalance"; CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testRebalanceForEntireDS just after executing " + cmdResult); + LogWriterUtils.getLogWriter().info("testRebalanceForEntireDS just after executing " + cmdResult); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testRebalanceForEntireDS stringResult : " + stringResult); + LogWriterUtils.getLogWriter().info("testRebalanceForEntireDS stringResult : " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); } else { fail("testRebalanceForIncludeRegionFunction failed as did not get CommandResult"); @@ -1903,14 +1903,14 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { private static void printCommandOutput(CommandResult cmdResult) { assertNotNull(cmdResult); - LogWriterSupport.getLogWriter().info("Command Output : "); + LogWriterUtils.getLogWriter().info("Command Output : "); StringBuilder sb = new StringBuilder(); cmdResult.resetToFirstLine(); while (cmdResult.hasNextLine()) { sb.append(cmdResult.nextLine()).append(DataCommandRequest.NEW_LINE); } - LogWriterSupport.getLogWriter().info(sb.toString()); - LogWriterSupport.getLogWriter().info(""); + LogWriterUtils.getLogWriter().info(sb.toString()); + LogWriterUtils.getLogWriter().info(""); } public static class Value1WithValue2 extends Value1 { @@ -1937,15 +1937,15 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { final VM manager = Host.getHost(0).getVM(0); manager.invoke(checkRegionMBeans); - LogWriterSupport.getLogWriter().info("testRebalanceForExcludeRegionFunction verified Mbean and executing command"); + LogWriterUtils.getLogWriter().info("testRebalanceForExcludeRegionFunction verified Mbean and executing command"); String command = "rebalance --exclude-region=" + "/" + REBALANCE_REGION2_NAME; - LogWriterSupport.getLogWriter().info("testRebalanceForExcludeRegionFunction command : " + command); + LogWriterUtils.getLogWriter().info("testRebalanceForExcludeRegionFunction command : " + command); CommandResult cmdResult = executeCommand(command); - LogWriterSupport.getLogWriter().info("testRebalanceForExcludeRegionFunction just after executing " + cmdResult); + LogWriterUtils.getLogWriter().info("testRebalanceForExcludeRegionFunction just after executing " + cmdResult); if (cmdResult != null) { String stringResult = commandResultToString(cmdResult); - LogWriterSupport.getLogWriter().info("testRebalanceForExcludeRegionFunction stringResult : " + stringResult); + LogWriterUtils.getLogWriter().info("testRebalanceForExcludeRegionFunction stringResult : " + stringResult); assertEquals(Result.Status.OK, cmdResult.getStatus()); } else { fail("testRebalanceForIncludeRegionFunction failed as did not get CommandResult"); @@ -1968,19 +1968,19 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { ManagerMXBean bean1 = service.getManagerMXBean(); DistributedRegionMXBean bean2 = service.getDistributedRegionMXBean(regionName); if (bean1 == null) { - LogWriterSupport.getLogWriter().info("waitForListClientMbean Still probing for ManagerMBean"); + LogWriterUtils.getLogWriter().info("waitForListClientMbean Still probing for ManagerMBean"); return false; } else { - LogWriterSupport.getLogWriter().info("waitForListClientMbean Still probing for DistributedRegionMXBean=" + bean2); + LogWriterUtils.getLogWriter().info("waitForListClientMbean Still probing for DistributedRegionMXBean=" + bean2); if (bean2 == null) { bean2 = service.getDistributedRegionMXBean(Region.SEPARATOR + regionName); } if (bean2 == null) { - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "waitForListClientMbean Still probing for DistributedRegionMXBean with separator = " + bean2); return false; } else { - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "waitForListClientMbean Still probing for DistributedRegionMXBean with separator Not null " + bean2.getMembers().length); if (bean2.getMembers().length > 1) { return true; @@ -2033,7 +2033,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { } }); - LogWriterSupport.getLogWriter().info("testRegionsViaMbeanAndFunctions memSizeFromMbean= " + memSizeFromMbean); + LogWriterUtils.getLogWriter().info("testRegionsViaMbeanAndFunctions memSizeFromMbean= " + memSizeFromMbean); String memSizeFromFunctionCall = (String) manager.invoke(new SerializableCallable() { public Object call() { @@ -2043,7 +2043,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { } }); - LogWriterSupport.getLogWriter().info("testRegionsViaMbeanAndFunctions memSizeFromFunctionCall= " + memSizeFromFunctionCall); + LogWriterUtils.getLogWriter().info("testRegionsViaMbeanAndFunctions memSizeFromFunctionCall= " + memSizeFromFunctionCall); assertTrue(memSizeFromFunctionCall.equals(memSizeFromMbean)); } @@ -2072,7 +2072,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { } }); - LogWriterSupport.getLogWriter().info("testRegionsViaMbeanAndFunctionsForPartRgn memSizeFromMbean= " + memSizeFromMbean); + LogWriterUtils.getLogWriter().info("testRegionsViaMbeanAndFunctionsForPartRgn memSizeFromMbean= " + memSizeFromMbean); String memSizeFromFunctionCall = (String) manager.invoke(new SerializableCallable() { public Object call() { @@ -2081,7 +2081,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase { } }); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( "testRegionsViaMbeanAndFunctionsForPartRgn memSizeFromFunctionCall= " + memSizeFromFunctionCall); assertTrue(memSizeFromFunctionCall.equals(memSizeFromMbean)); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java index d4bcb27..7f161fe 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java @@ -40,7 +40,7 @@ import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData; import com.gemstone.gemfire.management.internal.cli.result.ResultData; import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder; 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.SerializableRunnableIF; import com.gemstone.gemfire.test.dunit.VM; @@ -197,7 +197,7 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C protected void log(final String tag, final String message) { //System.out.printf("%1$s (%2$s)%n", tag, message); - LogWriterSupport.getLogWriter().info(String.format("%1$s (%2$s)%n", tag, message)); + LogWriterUtils.getLogWriter().info(String.format("%1$s (%2$s)%n", tag, message)); } protected CommandResult runCommand(final String command) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java index 66b914d..431c6b3 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java @@ -37,7 +37,7 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult; import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.SerializableCallable; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -741,8 +741,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase { } private void writeToLog(String text, String resultAsString) { - LogWriterSupport.getLogWriter().info(getTestMethodName() + "\n"); - LogWriterSupport.getLogWriter().info(resultAsString); + LogWriterUtils.getLogWriter().info(getTestMethodName() + "\n"); + LogWriterUtils.getLogWriter().info(resultAsString); } private void setupSystem() { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java index 1d37c49..386b8ed 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java @@ -29,7 +29,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.management.cli.Result; import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings; 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.SerializableRunnableIF; import com.gemstone.gemfire.test.dunit.VM; @@ -91,7 +91,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas protected Properties createDistributedSystemProperties(final String gemfireName) { final Properties distributedSystemProperties = new Properties(); - distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); distributedSystemProperties.setProperty(DistributionConfig.NAME_NAME, gemfireName); return distributedSystemProperties; @@ -127,7 +127,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas final Result result = executeCommand(CliStrings.LIST_DISK_STORE); assertNotNull(result); - LogWriterSupport.getLogWriter().info(toString(result)); + LogWriterUtils.getLogWriter().info(toString(result)); assertEquals(Result.Status.OK, result.getStatus()); } @@ -136,7 +136,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas CliStrings.DESCRIBE_DISK_STORE + " --member=producerServer --name=producerData"); assertNotNull(result); - LogWriterSupport.getLogWriter().info(toString(result)); + LogWriterUtils.getLogWriter().info(toString(result)); assertEquals(Result.Status.OK, result.getStatus()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java index 4956541..2d11491 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java @@ -35,7 +35,7 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult; import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder; import com.gemstone.gemfire.management.internal.cli.util.RegionAttributesNames; 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; @@ -193,8 +193,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase { String commandString = csb.toString(); CommandResult commandResult = executeCommand(commandString); String commandResultAsString = commandResultToString(commandResult); - LogWriterSupport.getLogWriter().info("Command String : " + commandString); - LogWriterSupport.getLogWriter().info("Output : \n" + commandResultAsString); + LogWriterUtils.getLogWriter().info("Command String : " + commandString); + LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString); assertEquals(Status.OK, commandResult.getStatus()); assertTrue(commandResultAsString.contains(PR1)); assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER)); @@ -208,8 +208,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase { commandString = csb.toString(); commandResult = executeCommand(commandString); commandResultAsString = commandResultToString(commandResult); - LogWriterSupport.getLogWriter().info("Command String : " + commandString); - LogWriterSupport.getLogWriter().info("Output : \n" + commandResultAsString); + LogWriterUtils.getLogWriter().info("Command String : " + commandString); + LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString); assertEquals(Status.OK, commandResult.getStatus()); assertTrue(commandResultAsString.contains(PR1)); assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER)); @@ -219,8 +219,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase { commandString = csb.toString(); commandResult = executeCommand(commandString); commandResultAsString = commandResultToString(commandResult); - LogWriterSupport.getLogWriter().info("Command String : " + commandString); - LogWriterSupport.getLogWriter().info("Output : \n" + commandResultAsString); + LogWriterUtils.getLogWriter().info("Command String : " + commandString); + LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString); assertEquals(Status.OK, commandResult.getStatus()); assertTrue(commandResultAsString.contains(PR1)); assertTrue(commandResultAsString.contains(REGION1)); @@ -233,8 +233,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase { commandString = csb.toString(); commandResult = executeCommand(commandString); commandResultAsString = commandResultToString(commandResult); - LogWriterSupport.getLogWriter().info("Command String : " + commandString); - LogWriterSupport.getLogWriter().info("Output : \n" + commandResultAsString); + LogWriterUtils.getLogWriter().info("Command String : " + commandString); + LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString); assertEquals(Status.OK, commandResult.getStatus()); assertTrue(commandResultAsString.contains(PR1)); assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER)); @@ -244,8 +244,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase { commandString = csb.toString(); commandResult = executeCommand(commandString); commandResultAsString = commandResultToString(commandResult); - LogWriterSupport.getLogWriter().info("Command String : " + commandString); - LogWriterSupport.getLogWriter().info("Output : \n" + commandResultAsString); + LogWriterUtils.getLogWriter().info("Command String : " + commandString); + LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString); assertEquals(Status.OK, commandResult.getStatus()); assertTrue(commandResultAsString.contains(PR1)); assertTrue(commandResultAsString.contains(REGION1)); @@ -261,8 +261,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase { String commandString = csb.toString(); CommandResult commandResult = executeCommand(commandString); String commandResultAsString = commandResultToString(commandResult); - LogWriterSupport.getLogWriter().info("Command String : " + commandString); - LogWriterSupport.getLogWriter().info("Output : \n" + commandResultAsString); + LogWriterUtils.getLogWriter().info("Command String : " + commandString); + LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString); assertEquals(Status.OK, commandResult.getStatus()); assertTrue(commandResultAsString.contains(PR1)); assertTrue(commandResultAsString.contains("Server1")); @@ -272,8 +272,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase { commandString = csb.toString(); commandResult = executeCommand(commandString); commandResultAsString = commandResultToString(commandResult); - LogWriterSupport.getLogWriter().info("Command String : " + commandString); - LogWriterSupport.getLogWriter().info("Output : \n" + commandResultAsString); + LogWriterUtils.getLogWriter().info("Command String : " + commandString); + LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString); assertEquals(Status.OK, commandResult.getStatus()); assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER)); assertTrue(commandResultAsString.contains("Manager")); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java index 176155f..b7c42dc 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java @@ -45,7 +45,7 @@ import com.gemstone.gemfire.management.cli.Result; import com.gemstone.gemfire.management.internal.cli.domain.IndexDetails; import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings; 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.SerializableRunnableIF; import com.gemstone.gemfire.test.dunit.VM; @@ -138,7 +138,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase { protected Properties createDistributedSystemProperties(final String gemfireName) { final Properties distributedSystemProperties = new Properties(); - distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterSupport.getDUnitLogLevel()); + distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()); distributedSystemProperties.setProperty(DistributionConfig.NAME_NAME, gemfireName); return distributedSystemProperties; @@ -176,7 +176,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase { } } } catch (Exception e) { - LogWriterSupport.getLogWriter().error( + LogWriterUtils.getLogWriter().error( String.format("Error occurred creating Index (%1$s) on Region (%2$s) - (%3$s)", indexName, region.getFullPath(), e.getMessage())); } @@ -278,11 +278,11 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase { @SuppressWarnings("unchecked") protected <T extends Comparable<T>, B extends AbstractBean<T>> B query(final Cache cache, final String queryString) { try { - LogWriterSupport.getLogWriter().info(String.format("Running Query (%1$s) in GemFire...", queryString)); + LogWriterUtils.getLogWriter().info(String.format("Running Query (%1$s) in GemFire...", queryString)); final SelectResults<B> results = (SelectResults<B>) cache.getQueryService().newQuery(queryString).execute(); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( String.format("Running Query (%1$s) in GemFire returned (%2$d) result(s).", queryString, results.size())); return (results.iterator().hasNext() ? results.iterator().next() : null); @@ -294,12 +294,12 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase { protected <T extends Comparable<T>, B extends AbstractBean<T>> B query(final Region<T, B> region, final String queryPredicate) { try { - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( String.format("Running Query (%1$s) on Region (%2$s)...", queryPredicate, region.getFullPath())); final SelectResults<B> results = region.query(queryPredicate); - LogWriterSupport.getLogWriter().info( + LogWriterUtils.getLogWriter().info( String.format("Running Query (%1$s) on Region (%2$s) returned (%3$d) result(s).", queryPredicate, region.getFullPath(), results.size())); @@ -315,7 +315,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase { final Result result = executeCommand(CliStrings.LIST_INDEX + " --" + CliStrings.LIST_INDEX__STATS); assertNotNull(result); - LogWriterSupport.getLogWriter().info(toString(result)); + LogWriterUtils.getLogWriter().info(toString(result)); assertEquals(Result.Status.OK, result.getStatus()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c05f6798/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java index 3cc09e2..7d6efc5 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java @@ -39,8 +39,8 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings; import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor; import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder; import com.gemstone.gemfire.test.dunit.Host; -import com.gemstone.gemfire.test.dunit.LogWriterSupport; -import com.gemstone.gemfire.test.dunit.NetworkSupport; +import com.gemstone.gemfire.test.dunit.LogWriterUtils; +import com.gemstone.gemfire.test.dunit.NetworkUtils; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; @@ -181,7 +181,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase { Properties props = new Properties(); props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); - props.setProperty(DistributionConfig.LOCATORS_NAME, NetworkSupport.getServerHostName(host) + "[" + locatorPort + "]"); + props.setProperty(DistributionConfig.LOCATORS_NAME, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]"); props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true"); props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true"); @@ -208,7 +208,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase { setupSystem(); CommandProcessor commandProcessor = new CommandProcessor(); Result result = commandProcessor.createCommandStatement(CliStrings.LIST_MEMBER, EMPTY_ENV).process(); - LogWriterSupport.getLogWriter().info("#SB" + getResultAsString(result)); + LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result)); assertEquals(true, result.getStatus().equals(Status.OK)); } @@ -231,7 +231,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase { CommandProcessor commandProcessor = new CommandProcessor(); Result result = commandProcessor.createCommandStatement(CliStrings.LIST_MEMBER, EMPTY_ENV).process(); - LogWriterSupport.getLogWriter().info("#SB" + getResultAsString(result)); + LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result)); assertEquals(true, result.getStatus().equals(Status.ERROR)); } finally { locator.stop(); // fix for bug 46562 @@ -250,7 +250,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase { CommandStringBuilder csb = new CommandStringBuilder(CliStrings.LIST_MEMBER); csb.addOption(CliStrings.LIST_MEMBER__GROUP, "G1"); Result result = commandProcessor.createCommandStatement(csb.toString(), EMPTY_ENV).process(); - LogWriterSupport.getLogWriter().info("#SB" + getResultAsString(result)); + LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result)); assertEquals(true, result.getStatus().equals(Status.OK)); } @@ -273,7 +273,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase { Result result = commandProcessor.createCommandStatement("describe member --name=" + member.getId(), EMPTY_ENV).process(); assertEquals(true, result.getStatus().equals(Status.OK)); - LogWriterSupport.getLogWriter().info("#SB" + getResultAsString(result)); + LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result)); //assertEquals(true, result.getStatus().equals(Status.OK)); } }
