|
36 | 36 | import org.junit.After; |
37 | 37 | import org.junit.AfterClass; |
38 | 38 | import org.junit.Assert; |
| 39 | +import org.junit.Assume; |
39 | 40 | import org.junit.Before; |
40 | 41 | import org.junit.BeforeClass; |
41 | 42 | import org.junit.Test; |
@@ -282,6 +283,8 @@ public void tearDown() throws Exception { |
282 | 283 |
|
283 | 284 | @Test(timeout = 450000) |
284 | 285 | public void testStopOneNode() throws Exception { |
| 286 | + Assume.assumeTrue(hostNames.length > 1); |
| 287 | + |
285 | 288 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
286 | 289 | AtomicInteger success = new AtomicInteger(0); |
287 | 290 | AtomicInteger failure = new AtomicInteger(0); |
@@ -317,6 +320,8 @@ public void testStopOneNode() throws Exception { |
317 | 320 |
|
318 | 321 | @Test(timeout = 450000) |
319 | 322 | public void testRestart() throws Exception { |
| 323 | + Assume.assumeTrue(hostNames.length > 1); |
| 324 | + |
320 | 325 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
321 | 326 | AtomicInteger success = new AtomicInteger(0); |
322 | 327 | AtomicInteger failure = new AtomicInteger(0); |
@@ -354,6 +359,8 @@ public void testRestart() throws Exception { |
354 | 359 |
|
355 | 360 | @Test(timeout = 450000) |
356 | 361 | public void testRepeatedStopOneNode() throws Exception { |
| 362 | + Assume.assumeTrue(hostNames.length > 1); |
| 363 | + |
357 | 364 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
358 | 365 | AtomicInteger success = new AtomicInteger(0); |
359 | 366 | AtomicInteger failure = new AtomicInteger(0); |
@@ -398,6 +405,8 @@ public void testRepeatedStopOneNode() throws Exception { |
398 | 405 |
|
399 | 406 | @Test(timeout = 450000) |
400 | 407 | public void testMinNodes() throws Exception { |
| 408 | + Assume.assumeTrue(hostNames.length > 1); |
| 409 | + |
401 | 410 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
402 | 411 | AtomicInteger success = new AtomicInteger(0); |
403 | 412 | AtomicInteger failure = new AtomicInteger(0); |
@@ -442,6 +451,8 @@ public void testMinNodes() throws Exception { |
442 | 451 |
|
443 | 452 | @Test(timeout = 450000) |
444 | 453 | public void testStopTwoNodes() throws Exception { |
| 454 | + Assume.assumeTrue(hostNames.length > 1); |
| 455 | + |
445 | 456 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
446 | 457 | try { |
447 | 458 | final AtomicInteger success = new AtomicInteger(0); |
@@ -485,6 +496,8 @@ public void testStopTwoNodes() throws Exception { |
485 | 496 |
|
486 | 497 | @Test(timeout = 450000) |
487 | 498 | public void xQueryMasstransformReplace() throws Exception { |
| 499 | + Assume.assumeTrue(hostNames.length > 1); |
| 500 | + |
488 | 501 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
489 | 502 | ServerTransform transform = new ServerTransform("add-attr-xquery-transform"); |
490 | 503 | transform.put("name", "Lang"); |
@@ -555,6 +568,8 @@ public void xQueryMasstransformReplace() throws Exception { |
555 | 568 |
|
556 | 569 | @Test(timeout = 450000) |
557 | 570 | public void xQueryMasstransformReplaceTwoNodes() throws Exception { |
| 571 | + Assume.assumeTrue(hostNames.length > 1); |
| 572 | + |
558 | 573 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
559 | 574 | ServerTransform transform = new ServerTransform("add-attr-xquery-transform"); |
560 | 575 | transform.put("name", "Lang"); |
@@ -627,6 +642,8 @@ public void xQueryMasstransformReplaceTwoNodes() throws Exception { |
627 | 642 |
|
628 | 643 | @Test(timeout = 450000) |
629 | 644 | public void xQueryMasstransformReplaceRepeated() throws Exception { |
| 645 | + Assume.assumeTrue(hostNames.length > 1); |
| 646 | + |
630 | 647 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
631 | 648 | ServerTransform transform = new ServerTransform("add-attr-xquery-transform"); |
632 | 649 | transform.put("name", "Lang"); |
@@ -705,6 +722,8 @@ public void xQueryMasstransformReplaceRepeated() throws Exception { |
705 | 722 |
|
706 | 723 | @Test(timeout = 450000) |
707 | 724 | public void massDeleteConsistentSnapShot() throws Exception { |
| 725 | + Assume.assumeTrue(hostNames.length > 1); |
| 726 | + |
708 | 727 | System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName()); |
709 | 728 | AtomicBoolean isRunning = new AtomicBoolean(true); |
710 | 729 | Map<String, String> props = new HashMap<String, String>(); |
|
0 commit comments