Skip to content

Commit

Permalink
rptest: Retry get_license() if failed
Browse files Browse the repository at this point in the history
- Fixes: #7363

(cherry picked from commit 246101b)
  • Loading branch information
graphcareful committed Nov 24, 2022
1 parent 2559bdf commit 060d20f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/rptest/tests/license_upgrade_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,19 @@ def test_license_upgrade(self):
return

# Upload a license
self.admin.put_license(license)
assert self.admin.put_license(license).status_code == 200

# Update all nodes to newest version
self.installer.install(self.redpanda.nodes, RedpandaInstaller.HEAD)
self.redpanda.restart_nodes(self.redpanda.nodes)
_ = wait_for_num_versions(self.redpanda, 1)

# Attempt to read license written by older version
license = self.admin.get_license()
assert license is not None and license['loaded'] is True
def license_loaded_ok():
license = self.admin.get_license()
return license is not None and license['loaded'] is True

wait_until(license_loaded_ok,
timeout_sec=30,
backoff_sec=1,
err_msg="Timeout waiting for license to exist in cluster")

0 comments on commit 060d20f

Please sign in to comment.