upgrade to guava r07

This commit is contained in:
kimchy 2010-10-20 12:09:19 +02:00
parent ae5bc20959
commit 0b593bd6d9
2 changed files with 10 additions and 4 deletions

View File

@ -8,7 +8,7 @@ dependencies {
runtime 'com.google.inject.extensions:guice-assisted-inject:2.0'
runtime 'com.google.inject.extensions:guice-multibindings:2.0'
runtime 'com.google.guava:guava:r06'
runtime 'com.google.guava:guava:r07'
runtime 'org.elasticsearch:es-trove:2.1.0'
runtime 'org.elasticsearch:es-jsr166y:20100615'

View File

@ -53,6 +53,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
client("node1").admin().indices().prepareCreate("test").execute().actionGet();
final AtomicLong idGenerator = new AtomicLong();
final AtomicLong indexCounter = new AtomicLong();
final AtomicBoolean stop = new AtomicBoolean(false);
Thread[] writers = new Thread[5];
final CountDownLatch stopLatch = new CountDownLatch(writers.length);
@ -68,6 +69,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
long id = idGenerator.incrementAndGet();
client("node1").prepareIndex("test", "type1", Long.toString(id))
.setSource(MapBuilder.<String, Object>newMapBuilder().put("test", "value" + id).map()).execute().actionGet();
indexCounter.incrementAndGet();
}
logger.info("**** done indexing thread {}", indexerId);
} catch (Exception e) {
@ -123,7 +125,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
client("node1").admin().indices().prepareRefresh().execute().actionGet();
logger.info("--> verifying indexed content");
for (int i = 0; i < 10; i++) {
assertThat(client("node1").prepareCount().setQuery(matchAllQuery()).execute().actionGet().count(), equalTo(idGenerator.get()));
assertThat(client("node1").prepareCount().setQuery(matchAllQuery()).execute().actionGet().count(), equalTo(indexCounter.get()));
}
}
@ -135,6 +137,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
client("node1").admin().indices().prepareCreate("test").execute().actionGet();
final AtomicLong idGenerator = new AtomicLong();
final AtomicLong indexCounter = new AtomicLong();
final AtomicBoolean stop = new AtomicBoolean(false);
Thread[] writers = new Thread[5];
logger.info("--> starting {} indexing threads", writers.length);
@ -149,6 +152,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
long id = idGenerator.incrementAndGet();
client("node1").prepareIndex("test", "type1", Long.toString(id))
.setSource(MapBuilder.<String, Object>newMapBuilder().put("test", "value" + id).map()).execute().actionGet();
indexCounter.incrementAndGet();
}
logger.info("**** done indexing thread {}", indexerId);
} catch (Exception e) {
@ -210,7 +214,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
client("node1").admin().indices().prepareRefresh().execute().actionGet();
logger.info("--> verifying indexed content");
for (int i = 0; i < 10; i++) {
assertThat(client("node1").prepareCount().setQuery(matchAllQuery()).execute().actionGet().count(), equalTo(idGenerator.get()));
assertThat(client("node1").prepareCount().setQuery(matchAllQuery()).execute().actionGet().count(), equalTo(indexCounter.get()));
}
}
@ -224,6 +228,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
client("node1").admin().indices().prepareCreate("test").execute().actionGet();
final AtomicLong idGenerator = new AtomicLong();
final AtomicLong indexCounter = new AtomicLong();
final AtomicBoolean stop = new AtomicBoolean(false);
Thread[] writers = new Thread[5];
final CountDownLatch stopLatch = new CountDownLatch(writers.length);
@ -238,6 +243,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
long id = idGenerator.incrementAndGet();
client("node2").prepareIndex("test", "type1", Long.toString(id))
.setSource(MapBuilder.<String, Object>newMapBuilder().put("test", "value" + id).map()).execute().actionGet();
indexCounter.incrementAndGet();
}
logger.info("**** done indexing thread {}", indexerId);
} catch (Exception e) {
@ -314,7 +320,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractNodesTests {
logger.info("--> verifying indexed content");
client("node2").admin().indices().prepareRefresh().execute().actionGet();
for (int i = 0; i < 10; i++) {
assertThat(client("node2").prepareCount().setQuery(matchAllQuery()).execute().actionGet().count(), equalTo(idGenerator.get()));
assertThat(client("node2").prepareCount().setQuery(matchAllQuery()).execute().actionGet().count(), equalTo(indexCounter.get()));
}
}
}