Skip to content

Commit 22a737f

Browse files
[integ-test-framework] Avoid test hanging when data.counter is not decreased
data.counter is not decreased sometimes when the test fail drastically. And the test will hang with the following message: ``` fixture_utils - Waiting for all processes to release shared fixture vpc_stacks_shared, currently in use by 2 processes ({'gw23: 33792'}) ``` This commit uses the min of data.counter and data.currently_using_processes to solve the issue
1 parent b51e673 commit 22a737f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration-tests/framework/fixture_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def release(self):
126126
return
127127

128128
timeout = time.time() + 4 * 60 * 60 # 4 hours from now
129-
while data.counter > 1:
129+
while min(data.counter, len(data.currently_using_processes)) > 1:
130130
logging.info(
131131
"Waiting for all processes to release shared fixture %s, currently in use by %d processes (%s)",
132132
self.name,

0 commit comments

Comments
 (0)