Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Flake: Abandoning Parent test #252

Open
asmacdo opened this issue Feb 27, 2025 · 0 comments
Open

CI Flake: Abandoning Parent test #252

asmacdo opened this issue Feb 27, 2025 · 0 comments

Comments

@asmacdo
Copy link
Member

asmacdo commented Feb 27, 2025

=================================== FAILURES ===================================
__________________________ test_abandoning_parent[1] ___________________________

temp_output_dir = '/tmp/pytest-of-runner/pytest-0/test_abandoning_parent_1_0/'
num_children = 1

@pytest.mark.parametrize("num_children", [1, 2, 10])
def test_abandoning_parent(temp_output_dir: str, num_children: int) -> None:
    duct_prefix = f"{temp_output_dir}log_"
    command = f"duct --s-i 0.001 --r-i 0.01 -p {duct_prefix} {ABANDONING_PARENT} {num_children} sleep 0.2"
    subprocess.check_output(command, shell=True)

    with open(f"{duct_prefix}usage.json") as usage_file:
        all_samples = [json.loads(line) for line in usage_file]

    all_pids = set(chain.from_iterable(sample["processes"] for sample in all_samples))

    # 1 for each child, 1 for pstree, 1 for parent
  assert len(all_pids) == num_children + 2

E AssertionError: assert 4 == (1 + 2)
E + where 4 = len({'2626', '2627', '2633', '2635'})

test/test_e2e.py:28: AssertionError
----------------------------- Captured stderr call -----------------------------
2025-02-27T19:58:39+0000 [INFO ] con-duct: duct is executing '/home/runner/work/duct/duct/test/data/abandoning_parent.sh 1 sleep 0.2'...
2025-02-27T19:58:39+0000 [INFO ] con-duct: Log files will be written to /tmp/pytest-of-runner/pytest-0/test_abandoning_parent_1_0/log_
2025-02-27T19:58:39+0000 [INFO ] con-duct: Summary:
Exit Code: 0
Command: /home/runner/work/duct/duct/test/data/abandoning_parent.sh 1 sleep 0.2
Log files location: /tmp/pytest-of-runner/pytest-0/test_abandoning_parent_1_0/log_
Wall Clock Time: 0.254 sec
Memory Peak Usage (RSS): 7.3 MB
Memory Average Usage (RSS): 6.7 MB
Virtual Memory Peak Usage (VSZ): 20.4 MB
Virtual Memory Average Usage (VSZ): 18.6 MB
Memory Peak Percentage: 0.00%
Memory Average Percentage: 0.00%
CPU Peak Usage: 0.00%
Average CPU Usage: 0.00%

=========================== short test summary info ============================
FAILED test/test_e2e.py::test_abandoning_parent[1] - AssertionError: assert 4 == (1 + 2)

  • where 4 = len({'2626', '2627', '2633', '2635'})
    ======================== 1 failed, 196 passed in 37.83s ========================
    py: exit 1 (39.01 seconds) /home/runner/work/duct/duct> pytest -vv --cov-report=xml test pid=2533
    py: FAIL code 1 (102.58=setup[63.57]+cmd[39.01] seconds)
    evaluation failed :( (102.84 seconds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant