// 1st scenario - main-one should fail, but the whole operation should succeed
// let the helper server bind to test port to prevent successful subsequent add connector operation on main-one
checkURL("main-one", false, "/RolloutPlanTestCase/RolloutServlet?operation=bind&bindPort=" + TEST_PORT);
CLIOpResult ret = testAddConnector("maxFailOnePlan");
Assert.assertTrue(ret.isIsOutcomeSuccess());
Assert.assertFalse(getServerStatus("main-one", ret));
Assert.assertTrue(getServerStatus("main-two", ret));
Assert.assertTrue(getServerStatus("main-three", ret));
Assert.assertTrue(getServerStatus("test-one", ret));
ret = testRemoveConnector("maxFailOnePlan");
Assert.assertTrue(ret.isIsOutcomeSuccess());
Assert.assertFalse(getServerStatus("main-one", ret));
Assert.assertTrue(getServerStatus("main-two", ret));
Assert.assertTrue(getServerStatus("main-three", ret));
Assert.assertTrue(getServerStatus("test-one", ret));
// 2nd scenario - main-one and main-three failures -> main-two should be rolled back but the operation succeed
checkURL("main-three", false, "/RolloutPlanTestCase/RolloutServlet?operation=bind&bindPort=" +
String.valueOf(TEST_PORT + CLITestSuite.portOffsets.get("main-three")));
ret = testAddConnector("maxFailOnePlan");
Assert.assertTrue(ret.isIsOutcomeSuccess());
Assert.assertFalse(getServerStatus("main-one", ret));
Assert.assertFalse(getServerStatus("main-two", ret));
Assert.assertFalse(getServerStatus("main-three", ret));
Assert.assertTrue(getServerStatus("test-one", ret));