ibzib commented on a change in pull request #15375:
URL: https://github.com/apache/beam/pull/15375#discussion_r695048427



##########
File path: 
sdks/java/extensions/ml/src/test/java/org/apache/beam/sdk/extensions/ml/RecommendationAICatalogItemIT.java
##########
@@ -42,13 +44,14 @@
 @RunWith(JUnit4.class)
 public class RecommendationAICatalogItemIT {
   @Rule public TestPipeline testPipeline = TestPipeline.create();
+  static String randomId = Integer.toString(new Random().nextInt());

Review comment:
       Nit: this doesn't need to be static, but should be private/final. (You 
should make catalogItem into a private final variable as well.)
   
   ```suggestion
     private final String randomId = Integer.toString(new Random().nextInt());
   ```

##########
File path: 
sdks/java/extensions/ml/src/test/java/org/apache/beam/sdk/extensions/ml/RecommendationAICatalogItemIT.java
##########
@@ -42,13 +44,14 @@
 @RunWith(JUnit4.class)
 public class RecommendationAICatalogItemIT {
   @Rule public TestPipeline testPipeline = TestPipeline.create();
+  static String randomId = Integer.toString(new Random().nextInt());

Review comment:
       Consider using java.util.UUID instead for an even lower chance of 
collisions.




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