becketqin commented on a change in pull request #9387: [FLINK-13231] [pubsub] 
Replace Max outstanding acknowledgement ids li…
URL: https://github.com/apache/flink/pull/9387#discussion_r315260070
 
 

 ##########
 File path: 
flink-connectors/flink-connector-gcp-pubsub/src/test/java/org/apache/flink/streaming/connectors/gcp/pubsub/PubSubSourceTest.java
 ##########
 @@ -120,10 +124,15 @@ public void testProcessMessage() throws Exception {
                when(sourceContext.getCheckpointLock()).thenReturn("some object 
to lock on");
 
                pubSubSource.open(null);
-               pubSubSource.processMessage(sourceContext, 
asList(receivedMessage("firstAckId", pubSubMessage(FIRST_MESSAGE)),
-                                                                               
                                        receivedMessage("secondAckId", 
pubSubMessage(SECOND_MESSAGE))));
+               List<ReceivedMessage> receivedMessages = asList(
+                       receivedMessage("firstAckId", 
pubSubMessage(FIRST_MESSAGE)),
+                       receivedMessage("secondAckId", 
pubSubMessage(SECOND_MESSAGE))
+               );
+               pubSubSource.processMessage(sourceContext, receivedMessages);
 
                //verify handling messages
+               verify(rateLimiter, 
times(1)).acquire(receivedMessages.get(0).getSerializedSize() + 
receivedMessages.get(1).getSerializedSize());
 
 Review comment:
   This test was left from the previous commit while the rate limit was still 
on bytes. I fixed it when merging the code.

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


With regards,
Apache Git Services

Reply via email to