Permalink
Browse files

TestCluster is not called by the junit Ant target because it *starts*…

… with "Test" instead of ending with "Test". So I didn't discover that there was a bug in the test code which I'm now fixing. Also, I'm removing the availability test because the logic is out-of-date with respect to the different implementations.
  • Loading branch information...
1 parent 4bff802 commit 7763aabd2c880c29c8647efa72edfebd74f83a12 @kirktrue kirktrue committed Jan 5, 2010
Showing with 1 addition and 21 deletions.
  1. +1 −21 test/unit/voldemort/cluster/TestCluster.java
@@ -16,8 +16,6 @@
package voldemort.cluster;
-import static voldemort.FailureDetectorTestUtils.recordException;
-import static voldemort.FailureDetectorTestUtils.recordSuccess;
import static voldemort.MutableStoreVerifier.create;
import static voldemort.cluster.failuredetector.FailureDetectorUtils.create;
@@ -75,7 +73,7 @@ public void setUp() throws Exception {
.setStoreVerifier(create(cluster.getNodes()))
.setTime(time);
- create(failureDetectorConfig);
+ failureDetector = create(failureDetectorConfig);
}
@Override
@@ -105,22 +103,4 @@ public void testStatusBeginsAsAvailable() {
assertTrue("Node " + n.getId() + " is not available.", failureDetector.isAvailable(n));
}
- @Test
- public void testUnavailability() throws Exception {
- Node n = cluster.getNodeById(1);
-
- // begins available
- assertTrue(failureDetector.isAvailable(n));
-
- // if set unavailable, is unavailable
- recordException(failureDetector, n);
-
- assertFalse(failureDetector.isAvailable(n));
-
- // if we set it back to available then it is available again
- recordSuccess(failureDetector, n);
-
- assertTrue(failureDetector.isAvailable(n));
- }
-
}

0 comments on commit 7763aab

Please sign in to comment.