ajamato commented on a change in pull request #15537:
URL: https://github.com/apache/beam/pull/15537#discussion_r712396340
##########
File path:
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/pubsublite/ReadWriteIT.java
##########
@@ -236,6 +236,8 @@ public void testReadWrite() throws Exception {
pipeline.getOptions().as(TestPipelineOptions.class).setBlockOnRun(false);
TopicPath topic = createTopic(getProject(pipeline.getOptions()));
+ // Sleep for topic creation to propagate.
+ Thread.sleep(10000);
Review comment:
Generally, its better to not add sleep to code like this, but rather
some logic that checks if a condition is met.
What if the sleep is not long enough in all situations?
This seems like it would introduce flakey/incorrect behavior
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]