kennknowles commented on code in PR #6542:
URL: https://github.com/apache/beam/pull/6542#discussion_r1813187984


##########
examples/java/src/test/java/org/apache/beam/examples/cookbook/MaxPerKeyExamplesTest.java:
##########
@@ -66,22 +71,27 @@
   private static final TableRow resultRow1 =
       new TableRow().set("month", 6).set("max_mean_temp", 85.3);
   private static final TableRow resultRow2 =
+      new TableRow().set("month", 6).set("max_mean_temp", 45.3);
+  private static final TableRow resultRow3 =
       new TableRow().set("month", 7).set("max_mean_temp", 75.4);
 
+  @Rule public TestPipeline p = TestPipeline.create();
+
   @Test
-  public void testExtractTempFn() throws Exception {
-    DoFnTester<TableRow, KV<Integer, Double>> extractTempFn = 
DoFnTester.of(new ExtractTempFn());
-    List<KV<Integer, Double>> results = extractTempFn.processBundle(TEST_ROWS);
-    Assert.assertThat(results, CoreMatchers.hasItem(kv1));
-    Assert.assertThat(results, CoreMatchers.hasItem(kv2));
-    Assert.assertThat(results, CoreMatchers.hasItem(kv3));
+  @Category(ValidatesRunner.class)

Review Comment:
   It is actually not necessary. The ValidatesRunner tag is just used to filter 
for tests of the basic Beam Model. It does not cause it to execute any 
differently. Just using `TestPipeline` does everything you need.



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