equal
deleted
inserted
replaced
76 private static void testCloseStreaming() throws Exception { |
76 private static void testCloseStreaming() throws Exception { |
77 CountDownLatch streaming = new CountDownLatch(1); |
77 CountDownLatch streaming = new CountDownLatch(1); |
78 RecordingStream r = new RecordingStream(); |
78 RecordingStream r = new RecordingStream(); |
79 AtomicLong count = new AtomicLong(); |
79 AtomicLong count = new AtomicLong(); |
80 r.onEvent(e -> { |
80 r.onEvent(e -> { |
81 if (count.incrementAndGet() == 100) { |
81 if (count.incrementAndGet() > 100) { |
82 streaming.countDown(); |
82 streaming.countDown(); |
83 } |
83 } |
84 }); |
84 }); |
85 r.startAsync(); |
85 r.startAsync(); |
86 var streamingLoop = CompletableFuture.runAsync(() -> { |
86 var streamingLoop = CompletableFuture.runAsync(() -> { |