@Test public void testRunProducer() throws Exception { Properties properties = new Properties(); properties.setProperty(IntegrationTestHelper.Config.ZNODE_PATH, "/producer/perf/cli/test"); properties.setProperty(IntegrationTestHelper.Config.NUM_PARTITIONS, "3"); properties.setProperty(IntegrationTestHelper.Config.ZK_SESSION_TIMEOUT, "30000"); IntegrationTestHelper helper = new IntegrationTestHelper(properties); Properties cfgProperties = createProperties(helper.getZkConnectString(), helper.getZnodePath(), helper.getZkSessionTimeout(), helper.getSslSetup()); String configFilePath = IntegrationTestHelper.createYamlConfigFile(DIR_NAME, CONFIG_FILE_NAME, cfgProperties); String[] args = { "test-producers", "--txn-size", "128", "--txn-per-thread", "10", "--num-thread", "2", "--interval", "10", "--cli-config-path", configFilePath, "--lock-pool-size", "2", "--num-active-partitions", "1" }; try { helper.startZooKeeperServer(); helper.startWaltzStorage(true); helper.setWaltzStorageAssignment(true); helper.startWaltzServer(true); PerformanceCli.testMain(args); String expectedCmdOutput = "Appended 20 transactions"; assertTrue(outContent.toString("UTF-8").contains(expectedCmdOutput)); } finally { helper.closeAll(); } }
public static void testMain(String[] args) { new PerformanceCli(args, true).processCmd(); }
PerformanceCli extends SubcommandCli { public static void testMain(String[] args) { new PerformanceCli(args, true).processCmd(); } }
PerformanceCli extends SubcommandCli { public static void testMain(String[] args) { new PerformanceCli(args, true).processCmd(); } private  PerformanceCli(String[] args, boolean useByTest); }
PerformanceCli extends SubcommandCli { public static void testMain(String[] args) { new PerformanceCli(args, true).processCmd(); } private  PerformanceCli(String[] args, boolean useByTest); static void testMain(String[] args); static void main(String[] args); }
PerformanceCli extends SubcommandCli { public static void testMain(String[] args) { new PerformanceCli(args, true).processCmd(); } private  PerformanceCli(String[] args, boolean useByTest); static void testMain(String[] args); static void main(String[] args);  }