@Test public void testListPartition() throws Exception { Properties properties = new Properties(); properties.setProperty(IntegrationTestHelper.Config.ZNODE_PATH, "/server/cli/test"); properties.setProperty(IntegrationTestHelper.Config.NUM_PARTITIONS, "3"); properties.setProperty(IntegrationTestHelper.Config.ZK_SESSION_TIMEOUT, "30000"); IntegrationTestHelper helper = new IntegrationTestHelper(properties); int jettyPort = helper.getServerJettyPort(); try { helper.startZooKeeperServer(); helper.startWaltzServer(true); String[] args = { "list", "--server", helper.getHost() + ":" + jettyPort }; ServerCli.testMain(args); String expectedCmdOutput = "There are " + helper.getNumPartitions() + " partitions for current server"; assertTrue(outContent.toString("UTF-8").contains(expectedCmdOutput)); } finally { helper.closeAll(); } }
public static void testMain(String[] args) { new ServerCli(args, true).processCmd(); }
ServerCli extends SubcommandCli { public static void testMain(String[] args) { new ServerCli(args, true).processCmd(); } }
ServerCli extends SubcommandCli { public static void testMain(String[] args) { new ServerCli(args, true).processCmd(); } private  ServerCli(String[] args, boolean useByTest); }
ServerCli extends SubcommandCli { public static void testMain(String[] args) { new ServerCli(args, true).processCmd(); } private  ServerCli(String[] args, boolean useByTest); static void testMain(String[] args); static void main(String[] args); }
ServerCli extends SubcommandCli { public static void testMain(String[] args) { new ServerCli(args, true).processCmd(); } private  ServerCli(String[] args, boolean useByTest); static void testMain(String[] args); static void main(String[] args);  }