Skip to content

Commit

Permalink
fix(robot): fix flaky test case Test Setting Concurrent Rebuild Limit
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Chiu <yang.chiu@suse.com>
  • Loading branch information
yangchiu committed Oct 14, 2024
1 parent 549b9f3 commit c9f3bae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion e2e/libs/volume/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def get_replica_name_on_node(self, volume_name, node_name):
def wait_for_replica_rebuilding_complete(self, volume_name, node_name):
completed = False
for i in range(self.retry_count):
logging(f"wait for {volume_name} replica rebuilding completed on {node_name} ... ({i})")
try:
v = get_longhorn_client().by_id_volume(volume_name)
for replica in v.replicas:
Expand All @@ -237,7 +238,7 @@ def wait_for_replica_rebuilding_complete(self, volume_name, node_name):
logging(f"Failed to get volume {volume_name} with error: {e}")
time.sleep(self.retry_interval)
logging(f"Completed volume {volume_name} replica rebuilding on {node_name}")
assert completed, f"Expect volume {volume_name} replica rebuilding completed"
assert completed, f"Expect volume {volume_name} replica rebuilding completed on {node_name}"

def check_data_checksum(self, volume_name, data_id):
return NotImplemented
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/regression/test_settings.robot
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Test Setting Concurrent Rebuild Limit
When Delete volume 0 replica on replica node
And Wait until volume 0 replica rebuilding started on replica node
And Delete volume 1 replica on replica node
And Crash volume 0 replica processes
And Delete volume 0 replica on replica node
And Wait until volume 0 replica rebuilding stopped on replica node
Then Only one replica rebuilding on replica node will start at a time, either for volume 0 or volume 1
And Wait until volume 0 replica rebuilding completed on replica node
Expand Down

0 comments on commit c9f3bae

Please sign in to comment.