mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-30 02:13:33 -04:00
long adder is not available in java7
This commit is contained in:
parent
be02cabfee
commit
343dc0b527
1 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ import org.junit.Test;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.LongAdder;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
import static com.google.common.collect.Lists.newArrayList;
|
import static com.google.common.collect.Lists.newArrayList;
|
||||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||||
|
@ -186,7 +186,7 @@ public class IndexWithShadowReplicasTests extends ElasticsearchIntegrationTest {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
final LongAdder totalDocs = new LongAdder();
|
final AtomicLong totalDocs = new AtomicLong();
|
||||||
final Runnable indexRunner = new Runnable() {
|
final Runnable indexRunner = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -203,7 +203,7 @@ public class IndexWithShadowReplicasTests extends ElasticsearchIntegrationTest {
|
||||||
try {
|
try {
|
||||||
logger.info("--> indexing batch of {} documents...", batchSize);
|
logger.info("--> indexing batch of {} documents...", batchSize);
|
||||||
indexRandom(true, true, true, indexRequests);
|
indexRandom(true, true, true, indexRequests);
|
||||||
totalDocs.add(batchSize);
|
totalDocs.addAndGet(batchSize);
|
||||||
if (randomBoolean()) {
|
if (randomBoolean()) {
|
||||||
// Randomly flush the shadow index
|
// Randomly flush the shadow index
|
||||||
flush(IDX);
|
flush(IDX);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue