Skip to content

Commit

Permalink
chore: cloud ci, add more robust sync points (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
digikata authored Oct 31, 2024
1 parent c2cc372 commit ed77a13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 12 additions & 3 deletions integration-tests/test_fluvio_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ def common_setup(self, sm_path=None):
try:
self.admin.create_topic(self.topic)
except Exception as err:
print("Retrying after create_topic error {}", err)
time.sleep(5)
self.admin.create_topic(self.topic)
print("create_topic error {}, will try to verify", err)

# list topics to verify topic was created
max_retries = 100
while max_retries > 0:
topic = self.admin.list_topics([self.topic])
if len(topic) > 0:
break
max_retries -= 1
if max_retries == 0:
self.fail("setup: Failed to create topic")
time.sleep(0.1)

def setUp(self):
self.common_setup()
Expand Down
4 changes: 1 addition & 3 deletions integration-tests/test_produce.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ def common_setup(self, sm_path=None):
try:
self.admin.create_topic(self.topic)
except Exception as err:
print("Retrying after create_topic error {}", err)
time.sleep(5)
self.admin.create_topic(self.topic)
print("create_topic error {}, will try to verify", err)

# list topics to verify topic was created
max_retries = 100
Expand Down

0 comments on commit ed77a13

Please sign in to comment.