Skip to content

Commit

Permalink
manually sample before multiprocessing.Process tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ZStriker19 committed Mar 1, 2024
1 parent f2beeea commit efcf424
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/integration/test_integration_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def task(tracer):
pass
tracer.shutdown()

with tracer.trace("parent"):
with tracer.trace("parent") as parent:
# need to manually sample before Popen
tracer._sampler.sample(parent)
p = multiprocessing.Process(target=task, args=(tracer,))
p.start()
p.join()
Expand Down Expand Up @@ -152,7 +154,9 @@ def task2(tracer):
p.join()
tracer.shutdown()

with tracer.trace("parent"):
with tracer.trace("parent") as parent:
# need to manually sample before Popen
tracer._sampler.sample(parent)
p = multiprocessing.Process(target=task, args=(tracer,))
p.start()
p.join()
Expand Down

0 comments on commit efcf424

Please sign in to comment.