use of org.redisson.api.RedissonRxClient in project redisson by redisson.
the class RedissonBatchRxTest method testBatchBigRequest.
@ParameterizedTest
@MethodSource("data")
public void testBatchBigRequest(BatchOptions batchOptions) {
Config config = BaseTest.createConfig();
config.useSingleServer().setTimeout(15000);
RedissonRxClient redisson = Redisson.create(config).rxJava();
RBatchRx batch = redisson.createBatch(batchOptions);
for (int i = 0; i < 210; i++) {
batch.getMap("test").fastPut("1", "2");
batch.getMap("test").fastPut("2", "3");
batch.getMap("test").put("2", "5");
batch.getAtomicLong("counter").incrementAndGet();
batch.getAtomicLong("counter").incrementAndGet();
}
BatchResult<?> res = sync(batch.execute());
Assertions.assertEquals(210 * 5, res.getResponses().size());
redisson.shutdown();
}
Aggregations