Skip to content

Commit

Permalink
more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Nov 4, 2024
1 parent 92dba3b commit 9b77d06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mlos_bench/mlos_bench/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import os
from logging import warning
from subprocess import run
from time import time_ns
from typing import Any, Generator, List

Expand Down Expand Up @@ -172,9 +173,13 @@ def locked_docker_services(
warning(f"{time_ns()} {worker_id}: Released {docker_setup_teardown_lock.path}")
# Yield the services so that tests within this worker can use them.
warning(f"{time_ns()} {worker_id}: Yielding services")
out = run("docker ps", shell=True, check=True, capture_output=True)
warning(f"{time_ns()} {worker_id}: pre locked yield: " + out.stdout.decode())
yield docker_services
# Now tests that use those services get to run on this worker...
# Once the tests are done, release the read lock that marks the services as in use.
out = run("docker ps", shell=True, check=True, capture_output=True)
warning(f"{time_ns()} {worker_id}: post locked yield: " + out.stdout.decode())
warning(f"{time_ns()} {worker_id}: Releasing read lock on {docker_services_lock.path}")
docker_services_lock.release_read_lock()
warning(f"{time_ns()} {worker_id}: Released read lock on {docker_services_lock.path}")
Expand Down

0 comments on commit 9b77d06

Please sign in to comment.