Skip to content

Commit 1327bee

Browse files
mergify[bot]jd
andauthored
test(profiling): fix a flaky test checking task name (#3487) (#3514)
The task name is not always the main thread, as another coroutine might run and might have been started by another test. (cherry picked from commit f50a3b6) Co-authored-by: Julien Danjou <[email protected]>
1 parent df0ef7f commit 1327bee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/profiling/collector/test_stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_collect_once():
7373
if e.thread_name == "MainThread":
7474
if TESTING_GEVENT:
7575
assert e.task_id > 0
76-
assert e.task_name == e.thread_name
76+
assert e.task_name is not None
7777
else:
7878
assert e.task_id is None
7979
assert e.task_name is None

0 commit comments

Comments
 (0)