beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [beam] aromanenko-dev commented on a change in pull request #11090: [BEAM-9470] :sdks:java:io:kinesis:test is flaky
Date Thu, 12 Mar 2020 09:12:47 GMT
aromanenko-dev commented on a change in pull request #11090: [BEAM-9470] :sdks:java:io:kinesis:test
is flaky

 File path: sdks/java/io/kinesis/src/test/java/org/apache/beam/sdk/io/kinesis/
 @@ -324,10 +325,15 @@ public void shouldCallRateLimitPolicy()
+    ArgumentCaptor<List<KinesisRecord>> recordsCaptor = ArgumentCaptor.forClass(List.class);
+    verify(customRateLimitPolicy, atLeastOnce()).onSuccess(recordsCaptor.capture());
+    List<List<KinesisRecord>> capturedRecords = recordsCaptor.getAllValues();
+    assertThat(capturedRecords).contains(
+        ImmutableList.of(a, b),
+        singletonList(c),
+        singletonList(d),
+        Collections.emptyList()
+    );
-    verify(customRateLimitPolicy).onSuccess(eq(ImmutableList.of(a, b)));
-    verify(customRateLimitPolicy).onSuccess(eq(singletonList(c)));
-    verify(customRateLimitPolicy).onSuccess(eq(singletonList(d)));
 Review comment:
   Sure, this patch is enough to run only this test `shouldCallRateLimitPolicy()` with Junit
   I know it's a not perfect solution, very hacky, but it allowed to run this test as much
time as I need. I didn't test other tests, so plz don't blame if something doesn't work =)

   Sorry for delay, I guess I'm in a different time zone with you.

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:

With regards,
Apache Git Services

View raw message