Commit 166324a
bf(test): add timeout to test_nwb2asset_remote_asset to prevent CI hang
When dandi-cli tests are run from dandi-archive CI via
`pytest --pyargs dandi`, the rootdir is dandi-archive, so
dandi-cli's tox.ini [pytest] config (which has --timeout=300)
is NOT read. This means the test has no timeout protection.
With dandischema 0.12.0, the test no longer fails quickly
(the model validation path changed), so it now reaches the
fsspec HTTP read which can hang indefinitely. The xfail marker
alone doesn't help -- xfail only catches exceptions, not hangs.
Adding @pytest.mark.timeout(120) ensures the test is killed
after 2 minutes regardless of which project runs it. The
xfail marker then catches the timeout as an expected failure.
Fixes: #1762
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent a3dd9f9 commit 166324a
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1145 | 1145 | | |
1146 | 1146 | | |
1147 | 1147 | | |
| 1148 | + | |
1148 | 1149 | | |
1149 | 1150 | | |
1150 | 1151 | | |
| |||
0 commit comments