Skip to content

Commit

Permalink
Fixed AdminServiceBasicTest which had wrong slop pusher job definition
Browse files Browse the repository at this point in the history
  • Loading branch information
rsumbaly authored and afeinberg committed Nov 8, 2010
1 parent 6cac3f5 commit ab1c73b
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions test/unit/voldemort/client/AdminServiceBasicTest.java
Expand Up @@ -637,34 +637,24 @@ protected Pair<ByteArray, Versioned<byte[]>> computeNext() {

@Test
public void testUpdateSlops() {
final List<Slop> entrySet = ServerTestUtils.createRandomSlops(0,
10000,
testStoreName,
"users",
"test-replication-persistent",
"test-readrepair-memory",
"test-consistent",
"test-consistent-with-pref-list");

Iterator<Versioned<Slop>> slopIterator = new AbstractIterator<Versioned<Slop>>() {

final Iterator<Slop> entrySetItr = entrySet.iterator();

@Override
protected Versioned<Slop> computeNext() {
while(entrySetItr.hasNext()) {
return Versioned.value(entrySetItr.next());
}
return endOfData();
}
};

final List<Versioned<Slop>> entrySet = ServerTestUtils.createRandomSlops(0,
10000,
testStoreName,
"users",
"test-replication-persistent",
"test-readrepair-memory",
"test-consistent",
"test-consistent-with-pref-list");

Iterator<Versioned<Slop>> slopIterator = entrySet.iterator();
getAdminClient().updateSlopEntries(0, slopIterator);

// check updated values
Iterator<Slop> entrysetItr = entrySet.iterator();
Iterator<Versioned<Slop>> entrysetItr = entrySet.iterator();

while(entrysetItr.hasNext()) {
Slop nextSlop = entrysetItr.next();
Versioned<Slop> versioned = entrysetItr.next();
Slop nextSlop = versioned.getValue();
Store<ByteArray, byte[], byte[]> store = getStore(0, nextSlop.getStoreName());

if(nextSlop.getOperation().equals(Slop.Operation.PUT)) {
Expand Down

0 comments on commit ab1c73b

Please sign in to comment.