增加kafka 测试

This commit is contained in:
hz21056617
2022-04-15 11:08:06 +08:00
parent 2640a2c61c
commit 33a58e8aac
11 changed files with 671 additions and 0 deletions
@@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ConcurrentLinkedQueue;
@AllArgsConstructor
public class BlockingQueueTestWork extends Thread {
@@ -27,6 +28,7 @@ public class BlockingQueueTestWork extends Thread {
}
public void offerTest() {
ConcurrentLinkedQueue<Integer> concurrentLinkedQueue = new ConcurrentLinkedQueue<>();
boolean offer = arrayBlockingQueue.offer(1);
if (!offer) {
System.out.println("队列满了");