|
|
@ -16,7 +16,6 @@ os.environ['FAKEUPLOAD'] = "1" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_athena(): |
|
|
|
def test_athena(): |
|
|
|
print("ATHENA") |
|
|
|
|
|
|
|
start = sec_since_boot() |
|
|
|
start = sec_since_boot() |
|
|
|
managed_processes['manage_athenad'].start() |
|
|
|
managed_processes['manage_athenad'].start() |
|
|
|
|
|
|
|
|
|
|
@ -30,14 +29,14 @@ def test_athena(): |
|
|
|
assert False, "manage_athenad is dead" |
|
|
|
assert False, "manage_athenad is dead" |
|
|
|
|
|
|
|
|
|
|
|
def expect_athena_starts(timeout=30): |
|
|
|
def expect_athena_starts(timeout=30): |
|
|
|
now = time.time() |
|
|
|
now = time.monotonic() |
|
|
|
athenad_pid = None |
|
|
|
athenad_pid = None |
|
|
|
while athenad_pid is None: |
|
|
|
while athenad_pid is None: |
|
|
|
try: |
|
|
|
try: |
|
|
|
athenad_pid = subprocess.check_output(["pgrep", "-P", manage_athenad_pid], encoding="utf-8").strip() |
|
|
|
athenad_pid = subprocess.check_output(["pgrep", "-P", manage_athenad_pid], encoding="utf-8").strip() |
|
|
|
return athenad_pid |
|
|
|
return athenad_pid |
|
|
|
except subprocess.CalledProcessError: |
|
|
|
except subprocess.CalledProcessError: |
|
|
|
if time.time() - now > timeout: |
|
|
|
if time.monotonic() - now > timeout: |
|
|
|
assert False, f"Athena did not start within {timeout} seconds" |
|
|
|
assert False, f"Athena did not start within {timeout} seconds" |
|
|
|
time.sleep(0.5) |
|
|
|
time.sleep(0.5) |
|
|
|
|
|
|
|
|
|
|
|