Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Before touching a subsystem, read the relevant notes in `contributing/`: `ARCHIT
- Speed up large runs with `-n auto` (pytest-xdist), e.g. `uv run pytest -n auto`.
- Group tests for the same unit (function/class) using `Test*` classes that mirror unit's name.
- Keep tests hermetic (network disabled except localhost per `[tool.pytest.ini_options]` in `pyproject.toml`); stub cloud calls with mocks.
- Keep the suite fast. Never let a test wait on real time.
- Machinery that costs hundreds of milliseconds per test (spawning a subprocess, starting a container, generating a key, real HTTP) has to earn its place by covering something cheaper tests cannot. Say so in the test when it does. On the other hand, losing black-box coverage or making the test hard to follow is worse than the milliseconds it costs.

## Commit & Pull Request Guidelines
- Name branches `issue_{issue_num}_{title}` when the work tracks an issue (e.g. `issue_3959_replicated_alb_gateways`), and `pr_{title}` otherwise.
Expand Down
15 changes: 15 additions & 0 deletions src/tests/_internal/cli/services/presets/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import pytest

from dstack._internal.cli.services.presets.tail import _FileLineReader


@pytest.fixture(autouse=True)
def no_tail_poll_wait(monkeypatch: pytest.MonkeyPatch):
"""
Stops the tailers from waiting between reads.

The agent writes its output to files rather than pipes, so reading it means polling,
and `_POLL_SECONDS` makes every run wait once after the agent has already exited.
Tests write the whole output up front, so there is nothing to wait for.
"""
monkeypatch.setattr(_FileLineReader, "_POLL_SECONDS", 0)
Loading