提交 efce2517 编写于 作者: N Nikita Koksharov

redundant test removed

上级 03ba0e73
......@@ -548,37 +548,6 @@ public class RedissonBlockingQueueTest extends RedissonQueueTest {
Assert.assertEquals(0, queue.size());
}
@Test
public void testBlockingQueue() {
RBlockingQueue<Integer> queue = getQueue();
ExecutorService executor = Executors.newFixedThreadPool(10);
final AtomicInteger counter = new AtomicInteger();
int total = 100;
for (int i = 0; i < total; i++) {
// runnable won't be executed in any particular order, and hence, int value as well.
executor.submit(() -> {
getQueue().add(counter.incrementAndGet());
});
}
int count = 0;
while (count < total) {
try {
// blocking
int item = queue.take();
assertThat(item > 0 && item <= total).isTrue();
} catch (InterruptedException exception) {
Assert.fail();
}
count++;
}
assertThat(counter.get()).isEqualTo(total);
queue.delete();
}
@Test
public void testDrainToCollection() throws Exception {
RBlockingQueue<Object> queue1 = getQueue();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册