Skip to content

Commit e78982f

Browse files
committed
fixup! Fix async-aware Gecko collection
1 parent 97b34bb commit e78982f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Lib/test/test_profiling/test_sampling_profiler/test_collectors.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,14 +691,15 @@ def test_gecko_collector_async_aware(self):
691691
awaited_by=[MockCoroInfo(task_name=1, call_stack=[])],
692692
)
693693

694-
collector.collect([
695-
MockAwaitedInfo(thread_id=100, awaited_by=[parent, child])
696-
])
694+
collector.collect(
695+
[MockAwaitedInfo(thread_id=100, awaited_by=[parent, child])],
696+
timestamps_us=[1000, 2000],
697+
)
697698
profile_data = export_gecko_profile(self, collector)
698699

699700
self.assertEqual(len(profile_data["threads"]), 1)
700701
thread_data = profile_data["threads"][0]
701-
self.assertEqual(thread_data["samples"]["length"], 1)
702+
self.assertEqual(thread_data["samples"]["length"], 2)
702703

703704
string_array = profile_data["shared"]["stringArray"]
704705
self.assertIn("parent_fn", string_array)

0 commit comments

Comments
 (0)