[ 
https://issues.apache.org/jira/browse/BEAM-8503?focusedWorklogId=336619&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-336619
 ]

ASF GitHub Bot logged work on BEAM-8503:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Oct/19 05:09
            Start Date: 31/Oct/19 05:09
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on pull request #9880: 
[BEAM-8503] Improve TestBigQuery and TestPubsub
URL: https://github.com/apache/beam/pull/9880#discussion_r340962119
 
 

 ##########
 File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/TestPubsub.java
 ##########
 @@ -172,6 +193,65 @@ public void publish(List<PubsubMessage> messages) throws 
IOException {
     pubsub.publish(eventsTopicPath, outgoingMessages);
   }
 
+  /** Pull up to 100 messages from {@link #subscriptionPath()}. */
+  public List<PubsubMessage> pull() throws IOException {
+    return pull(100);
+  }
+
+  /** Pull up to {@code maxBatchSize} messages from {@link 
#subscriptionPath()}. */
+  public List<PubsubMessage> pull(int maxBatchSize) throws IOException {
+    return pubsub.pull(0, subscriptionPath, 100, true).stream()
 
 Review comment:
   My impression from (very briefly) peeking at their docs was that you could 
set up an asynchronous pull. This is very low stakes, while the value of your 
change is high. So I would not block a merge on this. Let's just move forwards.
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 336619)
    Time Spent: 1.5h  (was: 1h 20m)

> Improve TestBigQuery and TestPubsub
> -----------------------------------
>
>                 Key: BEAM-8503
>                 URL: https://issues.apache.org/jira/browse/BEAM-8503
>             Project: Beam
>          Issue Type: Improvement
>          Components: testing
>            Reporter: Brian Hulette
>            Assignee: Brian Hulette
>            Priority: Minor
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Add better support for E2E BigQuery and Pubsub testing:
> - TestBigQuery should have the ability to insert data into the underlying 
> table before a test.
> - TestPubsub should have the ability to subcribe to the underlying topic and 
> read messages that were written during a test.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to