nehsyc commented on a change in pull request #13859:
URL: https://github.com/apache/beam/pull/13859#discussion_r573245433



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/testing/FakeDatasetService.java
##########
@@ -62,8 +63,12 @@
 
   Map<String, List<String>> insertErrors = Maps.newHashMap();
 
+  // The counter for the number of insertions performed.
+  static AtomicInteger insertCount;

Review comment:
       It seems that the instance can be reconstructed for multiple times. If 
not using a static variable, the counter will be zero at the verification time. 
There is explanation for the static table map above:
   ...each ParDo will get a separate instance of FakeDatasetServices...
   
https://github.com/apache/beam/blob/595c25263638b3d5624875e46b69a442cedb09a7/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/testing/FakeDatasetService.java#L59




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to