Skip to content

Commit 884ac31

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent e38ef50 commit 884ac31

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/spec/test/AsyncAwaitSpecTest.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,9 @@ import java.util.concurrent.SubmissionPublisher
700700
701701
def publisher = new SubmissionPublisher<String>()
702702
Thread.start {
703-
Thread.sleep(200)
703+
while (publisher.numberOfSubscribers == 0) {
704+
Thread.yield()
705+
}
704706
publisher.submit("hello from publisher")
705707
publisher.close()
706708
}

0 commit comments

Comments
 (0)