Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/DIRAC/Core/Utilities/test/Test_Profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ def test_base():
assert resWC["Value"] >= 0
assert resWC["Value"] >= res["Value"]

mainProcess.kill()
mainProcess.wait()


@pytest.mark.flaky(reruns=10)
def test_cpuUsage():
mainProcess = Popen(
[
Expand Down Expand Up @@ -147,6 +149,7 @@ def test_cpuUsage():
assert resTC["Value"] >= res["Value"]

# After this the main process will no-longer exist
mainProcess.kill()
mainProcess.wait()

res = p.cpuUsageUser()
Expand Down
5 changes: 5 additions & 0 deletions src/DIRAC/tests/Utilities/ProcessesCreator_withChildren.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ def do_sum(args):
p.daemon = False
p.start()
p.join()

# On fast machines, this can finish too quickly
# Just sleep (we've accumulated usage now)
# and the test can interrupt this with a kill
time.sleep(60)
Loading