have rolling restart stress test create incremental ids

This commit is contained in:
kimchy 2011-01-31 21:41:46 +02:00
parent c7add5f377
commit f8b5628db9
1 changed files with 3 additions and 1 deletions

View File

@ -67,6 +67,7 @@ public class RollingRestartStressTest {
private Node client;
private AtomicLong indexCounter = new AtomicLong();
private AtomicLong idCounter = new AtomicLong();
public RollingRestartStressTest numberOfNodes(int numberOfNodes) {
@ -253,7 +254,8 @@ public class RollingRestartStressTest {
json.endObject();
client.client().prepareIndex("test", "type1")
client.client().prepareIndex("test", "type1", Long.toString(idCounter.incrementAndGet()))
.setCreate(true)
.setSource(json)
.execute().actionGet();
indexCounter.incrementAndGet();