Skip to content

Commit

Permalink
Fixes racing condition when message is sent to broker before topic lo…
Browse files Browse the repository at this point in the history
…gs are created
  • Loading branch information
asdaraujo committed Feb 13, 2018
1 parent c5ee4b3 commit 406aa30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/testutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def setUp(self):
self.client.load_metadata_for_topics(self.topic, ignore_leadernotavailable=False)
if self.client.has_metadata_for_topic(topic):
break
except LeaderNotAvailableError, InvalidTopicError:
except (LeaderNotAvailableError, InvalidTopicError):
time.sleep(1)
else:
raise KafkaTimeoutError('Timeout loading topic metadata!')
Expand Down

0 comments on commit 406aa30

Please sign in to comment.