steep-eve-20716
10/17/2024, 5:45 PMsteep-eve-20716
10/17/2024, 5:48 PM@pytest.mark.timeout(60)
directly
• Question:
◦ (A) migrate existing config [test].default_timeout
to be per-case?
◦ Or (B) introduce new configuration like [test].default_case_timeout
, and user is responsible for managing both file and case timeouts relative to one anothersteep-eve-20716
10/17/2024, 5:49 PMsteep-eve-20716
10/17/2024, 5:55 PMhappy-kitchen-89482
10/18/2024, 1:28 PMhappy-kitchen-89482
10/18/2024, 1:28 PMhappy-kitchen-89482
10/18/2024, 1:29 PMsteep-eve-20716
10/18/2024, 4:38 PMcurved-manchester-66006
10/18/2024, 6:22 PMPYTEST_TIMEOUT
or --pytest-args
happy-kitchen-89482
10/21/2024, 1:15 PMhappy-kitchen-89482
10/21/2024, 1:16 PMhappy-kitchen-89482
10/21/2024, 1:16 PMsteep-eve-20716
10/21/2024, 4:00 PMhappy-kitchen-89482
10/23/2024, 12:05 AMsteep-eve-20716
10/23/2024, 4:57 PM@pytest.mark.parametrize("test_input,expected", ARRAY_WITH_5_ITEMS)
def test_eval(test_input, expected):
assert eval(test_input) == expected
`b_test.py`:
@pytest.mark.parametrize("test_input,expected", ARRAY_WITH_50_ITEMS)
def test_eval(test_input, expected):
assert eval(test_input) == expected
`c_test.py`:
@pytest.mark.parametrize("test_input,expected", ARRAY_WITH_500_ITEMS)
def test_eval(test_input, expected):
assert eval(test_input) == expected
With today's file-level timeout, there are 2 problems:
1. I can't just use [test].timeout
to configure timeouts. I must use BUILD
to override timeouts per-file (5, 50, and 500 seconds respectively)
a. This becomes quite a burden with 1000s of test files
b. *_I recognize that I'm assuming: test case duration is usually more consistent than number of tests in a file. This is my anecdotal experience, but maybe not always true_
2. If 1 of 500 tests in c_test.py
are stuck, I still have to wait 500 seconds for any response from pants
a. This problem is massively worsened by batching. If 1 of 5 test in a_test.py
are stuck and it happens to be batched with c_test.py
, then I have to wait 505 seconds for any logs or indication, despite explicitly setting the timeout for a_test.py
file to 5 seconds.happy-kitchen-89482
10/24/2024, 4:24 AMsteep-eve-20716
10/24/2024, 4:40 AMhappy-kitchen-89482
10/24/2024, 5:04 AMsteep-eve-20716
10/24/2024, 4:30 PM