Skip to content

Commit

Permalink
test: retry shouldListTopics test (#8244)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zara Lim authored Oct 12, 2021
1 parent 60c1bb2 commit 7c7ac07
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,14 @@ public void shouldListTables() throws Exception {
@SuppressWarnings("unchecked")
@Test
public void shouldListTopics() throws Exception {
// When
final List<TopicInfo> topics = client.listTopics().get();

// Then
assertThat("" + topics, topics, containsInAnyOrder(
// Then:
assertThatEventually(() -> {
try {
return client.listTopics().get();
} catch (final InterruptedException | ExecutionException e) {
return null;
}
}, containsInAnyOrder(
topicInfo(TEST_TOPIC),
topicInfo(EMPTY_TEST_TOPIC),
topicInfo(AGG_TABLE),
Expand Down

0 comments on commit 7c7ac07

Please sign in to comment.