Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit19fde8e

Browse files
fix: extend wait timeout for test_delete_user()
Have been seeing intermittent failures of the test_delete_user()functional test. Have made the following changes to hopefully resolvethe issue and if it still fails to know better why the failureoccurred.* Extend the wait timeout for test_delete_user() from 30 to 60 tries of 0.5 seconds each.* Modify wait_for_sidekiq() to return True if sidekiq process terminated. Return False if the timeout expired.* Modify wait_for_sidekiq() to loop through all processes instead of assuming there is only one process. If all processes are not busy then return.* Modify wait_for_sidekiq() to sleep at least once before checking for processes being busy.* Check for True being returned in test_delete_user() call to wait_for_sidekiq()
1 parent2b29776 commit19fde8e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

‎tools/functional/api/test_users.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def test_delete_user(gl, wait_for_sidekiq):
5656
)
5757

5858
new_user.delete()
59-
wait_for_sidekiq()
59+
result=wait_for_sidekiq(timeout=60)
60+
assertresult==True,"sidekiq process should have terminated but did not"
6061

6162
assertnew_user.idnotin [user.idforuseringl.users.list()]
6263

‎tools/functional/conftest.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,15 @@ def wait_for_sidekiq(gl):
8989

9090
def_wait(timeout=30,step=0.5):
9191
for_inrange(timeout):
92-
ifnotgl.sidekiq.process_metrics()["processes"][0]["busy"]:
93-
return
9492
time.sleep(step)
93+
busy=False
94+
processes=gl.sidekiq.process_metrics()["processes"]
95+
forprocessinprocesses:
96+
ifprocess["busy"]:
97+
busy=True
98+
ifnotbusy:
99+
returnTrue
100+
returnFalse
95101

96102
return_wait
97103

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp