Skip to content

Commit 406aa30

Browse files
committed
Fixes racing condition when message is sent to broker before topic logs are created
1 parent c5ee4b3 commit 406aa30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/testutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def setUp(self):
125125
self.client.load_metadata_for_topics(self.topic, ignore_leadernotavailable=False)
126126
if self.client.has_metadata_for_topic(topic):
127127
break
128-
except LeaderNotAvailableError, InvalidTopicError:
128+
except (LeaderNotAvailableError, InvalidTopicError):
129129
time.sleep(1)
130130
else:
131131
raise KafkaTimeoutError('Timeout loading topic metadata!')

0 commit comments

Comments
 (0)