use of org.infinispan.server.hotrod.test.TestSizeResponse in project infinispan by infinispan.
the class HotRodDistributionTest method testSize.
public void testSize(Method m) {
// Cache contents not cleared between methods to avoid deleting
// topology information, so just use a different cache
String newCacheName = "dist-size";
startCaches(newCacheName);
List<HotRodClient> newClients = createClients(newCacheName);
try {
TestSizeResponse sizeStart = newClients.get(0).size();
assertStatus(sizeStart, Success);
assertEquals(0, sizeStart.size);
for (int i = 0; i < 20; i++) {
newClients.get(1).assertPut(m, "k-" + i, "v-" + i);
}
TestSizeResponse sizeEnd = newClients.get(1).size();
assertStatus(sizeEnd, Success);
assertEquals(20, sizeEnd.size);
} finally {
newClients.forEach(HotRodTestingUtil::killClient);
}
}
use of org.infinispan.server.hotrod.test.TestSizeResponse in project infinispan by infinispan.
the class HotRodFunctionalTest method testSize.
public void testSize(Method m) {
TestSizeResponse sizeStart = client().size();
assertStatus(sizeStart, Success);
assertEquals(0, sizeStart.size);
for (int i = 0; i < 20; i++) {
client().assertPut(m, "k-" + i, "v-" + i);
}
TestSizeResponse sizeEnd = client().size();
assertStatus(sizeEnd, Success);
assertEquals(20, sizeEnd.size);
}
use of org.infinispan.server.hotrod.test.TestSizeResponse in project infinispan by infinispan.
the class HotRodReplicationTest method testSize.
public void testSize(Method m) {
// Cache contents not cleared between methods to avoid deleting
// topology information, so just use a different cache
String newCacheName = "repl-size";
startCaches(newCacheName);
List<HotRodClient> newClients = createClients(newCacheName);
try {
TestSizeResponse sizeStart = newClients.get(0).size();
assertStatus(sizeStart, Success);
assertEquals(0, sizeStart.size);
for (int i = 0; i < 20; i++) {
newClients.get(1).assertPut(m, "k-" + i, "v-" + i);
}
TestSizeResponse sizeEnd = newClients.get(1).size();
assertStatus(sizeEnd, Success);
assertEquals(20, sizeEnd.size);
} finally {
newClients.forEach(HotRodClient::stop);
}
}
use of org.infinispan.server.hotrod.test.TestSizeResponse in project infinispan by infinispan.
the class HotRodWithStoreTest method testSize.
public void testSize(Method m) {
TestSizeResponse sizeStart = client().size();
assertStatus(sizeStart, Success);
assertEquals(0, sizeStart.size);
for (int i = 0; i < 20; i++) client().assertPut(m, "k-" + i, "v-" + i);
// Clear contents from memory
advancedCache.withFlags(Flag.SKIP_CACHE_STORE).clear();
TestSizeResponse sizeEnd = client().size();
assertStatus(sizeEnd, Success);
assertEquals(20, sizeEnd.size);
}
Aggregations