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


##########
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:
   It is not in a pipeline execution context. Only a unit test for data sampler.



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