|
@@ -47,7 +47,6 @@ public class TestZKFailoverControllerStress extends ClientBaseWithFixes {
|
|
conf = new Configuration();
|
|
conf = new Configuration();
|
|
conf.set(ZKFailoverController.ZK_QUORUM_KEY, hostPort);
|
|
conf.set(ZKFailoverController.ZK_QUORUM_KEY, hostPort);
|
|
this.cluster = new MiniZKFCCluster(conf, getServer(serverFactory));
|
|
this.cluster = new MiniZKFCCluster(conf, getServer(serverFactory));
|
|
- cluster.start();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@After
|
|
@After
|
|
@@ -61,6 +60,7 @@ public class TestZKFailoverControllerStress extends ClientBaseWithFixes {
|
|
*/
|
|
*/
|
|
@Test(timeout=(STRESS_RUNTIME_SECS + EXTRA_TIMEOUT_SECS) * 1000)
|
|
@Test(timeout=(STRESS_RUNTIME_SECS + EXTRA_TIMEOUT_SECS) * 1000)
|
|
public void testExpireBackAndForth() throws Exception {
|
|
public void testExpireBackAndForth() throws Exception {
|
|
|
|
+ cluster.start();
|
|
long st = System.currentTimeMillis();
|
|
long st = System.currentTimeMillis();
|
|
long runFor = STRESS_RUNTIME_SECS * 1000;
|
|
long runFor = STRESS_RUNTIME_SECS * 1000;
|
|
|
|
|
|
@@ -86,6 +86,7 @@ public class TestZKFailoverControllerStress extends ClientBaseWithFixes {
|
|
*/
|
|
*/
|
|
@Test(timeout=(STRESS_RUNTIME_SECS + EXTRA_TIMEOUT_SECS) * 1000)
|
|
@Test(timeout=(STRESS_RUNTIME_SECS + EXTRA_TIMEOUT_SECS) * 1000)
|
|
public void testRandomExpirations() throws Exception {
|
|
public void testRandomExpirations() throws Exception {
|
|
|
|
+ cluster.start();
|
|
long st = System.currentTimeMillis();
|
|
long st = System.currentTimeMillis();
|
|
long runFor = STRESS_RUNTIME_SECS * 1000;
|
|
long runFor = STRESS_RUNTIME_SECS * 1000;
|
|
|
|
|
|
@@ -119,6 +120,11 @@ public class TestZKFailoverControllerStress extends ClientBaseWithFixes {
|
|
.when(cluster.getService(1).proxy).monitorHealth();
|
|
.when(cluster.getService(1).proxy).monitorHealth();
|
|
ActiveStandbyElector.NUM_RETRIES = 100;
|
|
ActiveStandbyElector.NUM_RETRIES = 100;
|
|
|
|
|
|
|
|
+ // Don't start until after the above mocking. Otherwise we can get
|
|
|
|
+ // Mockito errors if the HM calls the proxy in the middle of
|
|
|
|
+ // setting up the mock.
|
|
|
|
+ cluster.start();
|
|
|
|
+
|
|
long st = System.currentTimeMillis();
|
|
long st = System.currentTimeMillis();
|
|
while (System.currentTimeMillis() - st < runFor) {
|
|
while (System.currentTimeMillis() - st < runFor) {
|
|
cluster.getTestContext().checkException();
|
|
cluster.getTestContext().checkException();
|