public void testGetGroupInfo() throws Exception { testGroupInfoForServer(tsaPort_1, true); testGroupInfoForServer(tsaPort_2, false); server_1.stop(); waitTillBecomeActive(jmxPort_2); testGroupInfoForServer(tsaPort_1, false); testGroupInfoForServer(tsaPort_2, true); }
@Override protected void setUp() throws Exception { configBuilder = new TcConfigBuilder("/com/tc/active-passive-fail-over-test.xml"); configBuilder.randomizePorts(); jmxPort_1 = configBuilder.getJmxPort(0); jmxPort_2 = configBuilder.getJmxPort(1); tsaPort_1 = configBuilder.getTsaPort(0); tsaPort_2 = configBuilder.getTsaPort(1); server_1 = createServer("server-1"); server_2 = createServer("server-2"); server_1.start(); System.out.println("server1 started"); waitTillBecomeActive(jmxPort_1); System.out.println("server1 became active"); server_2.start(); System.out.println("server2 started"); waitTillBecomePassiveStandBy(jmxPort_2); System.out.println("server2 became passive"); }
@Override protected void tearDown() throws Exception { System.err.println("in tearDown"); if (server_1 != null && server_1.isRunning()) server_1.stop(); if (server_2 != null && server_2.isRunning()) server_2.stop(); }