shunping commented on code in PR #38736:
URL: https://github.com/apache/beam/pull/38736#discussion_r3326322548


##########
sdks/go/pkg/beam/core/runtime/exec/datasampler_test.go:
##########
@@ -104,16 +104,9 @@ func TestDataSampler(t *testing.T) {
                        for _, sample := range test.samples {
                                dataSampler.SendSample(sample.PCollectionID, 
sample.Element, sample.Timestamp)
                        }
-                       var samplesCount = -1
-                       var samples map[string][]*DataSample
-                       for i := 0; i < 5; i++ {
-                               samples = dataSampler.GetSamples(test.pids)
-                               if len(samples) == len(test.want) {
-                                       samplesCount = len(samples)
-                                       break
-                               }
-                               time.Sleep(time.Second)
-                       }
+                       time.Sleep(1 * time.Second)
+                       samples := dataSampler.GetSamples(test.pids)
+                       samplesCount := len(samples)

Review Comment:
   Let's see if this will reduce the flakiness. If not, then we will revisit 
the test and try synctest maybe.



-- 
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]

Reply via email to