Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor simplification of testReadRepairWithFailures. Remove redundant …

…get after read repair.
  • Loading branch information...
commit b60d29c3cbc198e6bd273ad7a5c87110d79fb8d3 1 parent c113bb9
Ismael Juma ijuma authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 test/unit/voldemort/store/routed/RoutedStoreTest.java
8 test/unit/voldemort/store/routed/RoutedStoreTest.java
View
@@ -335,15 +335,13 @@ public void testReadRepairWithFailures() throws InterruptedException {
// if there are failures.
Iterables.get(cluster.getNodes(), 1).getStatus().setUnavailable();
Iterables.getLast(cluster.getNodes()).getStatus().setUnavailable();
- store.get(aKey);
+ List<Versioned<byte[]>> versioneds = store.get(aKey);
+ assertEquals(1, versioneds.size());
+ assertEquals(new ByteArray(anotherValue), new ByteArray(versioneds.get(0).getValue()));
// Read repairs are done asynchronously, so we sleep for a short period.
// It may be a good idea to use a synchronous executor service.
Thread.sleep(100);
-
- List<Versioned<byte[]>> versioneds = store.get(aKey);
- assertEquals(1, versioneds.size());
- assertEquals(new ByteArray(anotherValue), new ByteArray(versioneds.get(0).getValue()));
for(Store<ByteArray, byte[]> innerStore: routedStore.getInnerStores().values()) {
List<Versioned<byte[]>> innerVersioneds = innerStore.get(aKey);
assertEquals(1, versioneds.size());
Please sign in to comment.
Something went wrong with that request. Please try again.