Skip to content

Commit

Permalink
Merge pull request apache#12301 from Xeli/FLINK-16572-logs
Browse files Browse the repository at this point in the history
[FLINK-16572] [pubsub,e2e] Add check to see if adding a timeout to th…
  • Loading branch information
Xeli committed May 25, 2020
1 parent edfb7c4 commit 50253c6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ public void testPull() throws Exception {
.get();

List<ReceivedMessage> receivedMessages = pubsubHelper.pullMessages(PROJECT_NAME, SUBSCRIPTION_NAME, 1);

//TODO this is just to test if we need to wait longer, or if something has gone wrong and the message will never arrive
if (receivedMessages.isEmpty()) {
LOG.error("Message did not arrive, gonna wait 60s and try to pull again.");
Thread.sleep(30 * 1000);
receivedMessages = pubsubHelper.pullMessages(PROJECT_NAME, SUBSCRIPTION_NAME, 1);
}
assertEquals(1, receivedMessages.size());
assertEquals("Hello World PULL", receivedMessages.get(0).getMessage().getData().toStringUtf8());

Expand Down

0 comments on commit 50253c6

Please sign in to comment.