Skip to content

Commit

Permalink
JsonTest - add a wait?
Browse files Browse the repository at this point in the history
  • Loading branch information
rbygrave committed Nov 26, 2024
1 parent aabbb6c commit c754648
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions avaje-jex/src/test/java/io/avaje/jex/jdk/JsonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import java.net.http.HttpHeaders;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.LockSupport;
import java.util.stream.Stream;

import org.junit.jupiter.api.AfterAll;
Expand Down Expand Up @@ -69,6 +71,7 @@ void stream_viaIterator() {
// expect client gets the expected stream of beans
assertCollectedStream(beanStream);
// assert AutoCloseable iterator on the server-side was closed
LockSupport.parkNanos(TimeUnit.NANOSECONDS.toMillis(10));
assertThat(ITERATOR.isClosed()).isTrue();
}

Expand Down

0 comments on commit c754648

Please sign in to comment.