Skip to content

refactor: remove integration tests and sim_adapter#140

Closed
hlin99 wants to merge 1 commit into
mainfrom
refactor/remove-integration-tests
Closed

refactor: remove integration tests and sim_adapter#140
hlin99 wants to merge 1 commit into
mainfrom
refactor/remove-integration-tests

Conversation

@hlin99

@hlin99 hlin99 commented Apr 6, 2026

Copy link
Copy Markdown
Member

Tests migrated to xPyD-integration. Remove integration/ + stress/ + sim_adapter.py + conftest.py + xpyd-sim dep.

Removed:

  • tests/integration/ (~115 tests)
  • tests/stress/ (~10 tests)
  • sim_adapter.py
  • tests/conftest.py (only used by integration tests)
  • 2 integration-style tests from test_metrics.py (used client fixture from conftest)
  • xpyd-sim dev dependency from pyproject.toml

Remaining: 393 unit tests, all passing.

@hlin99-Review-Bot hlin99-Review-Bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing because .github/workflows/ci.yml still references the deleted directories:

  1. test job: python -m pytest tests/unit/ tests/integration/ -vtests/integration/ no longer exists.
  2. build job: pip install ... xpyd-sim && python -m pytest tests/integration/test_cli_and_discovery.py -v — file no longer exists, and xpyd-sim is no longer a dependency.
  3. benchmark job: python -m pytest tests/stress/ -vtests/stress/ no longer exists.

The PR removes the test files and xpyd-sim dep but does not update the CI workflow. Please update .github/workflows/ci.yml to:

  • Remove tests/integration/ from the test command (just run tests/unit/).
  • Remove or update the build job that runs test_cli_and_discovery.py.
  • Remove or update the benchmark job that runs tests/stress/.

Also: no linked GitHub Issue found in the PR description. If this relates to an issue, please reference it.

@hlin99-Review-BotX hlin99-Review-BotX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is red — the workflow (.github/workflows/ci.yml) still references the deleted directories and the removed xpyd-sim dependency:

  1. test job: runs tests/integration/ which no longer exists.
  2. build job: installs xpyd-sim and runs tests/integration/test_cli_and_discovery.py — both removed.
  3. benchmark job: runs tests/stress/ which no longer exists.

The CI workflow must be updated to match the removed files. Agree with hlin99-Review-Bot's earlier review — this is still unresolved on the current commit.

Additionally, no linked GitHub Issue in the PR description.

@hlin99

hlin99 commented Apr 6, 2026

Copy link
Copy Markdown
Member Author

Fixed in f99078d.

@hlin99-Review-Bot hlin99-Review-Bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI workflow updates address the previous review feedback (removed integration/stress/benchmark references), but the build job is now failing with 20 test failures.

Root cause: The build job installs only pytest (pip install pytest) then runs the full unit test suite (python -m pytest tests/unit/ -v). However, several unit tests in test_discovery_models.py and test_pd_metrics.py are async (@pytest.mark.anyio) and require pytest-asyncio (or anyio) to run. Since the build job only installs bare pytest, all async tests fail with async def functions are not natively supported.

Fix options:

  1. Change the build job test step to also install pytest-asyncio: pip install pytest pytest-asyncio && python -m pytest tests/unit/ -v --tb=short
  2. Or skip the unit test run in the build job entirely (its purpose is to verify the wheel installs and xpyd --help works — the test job already runs the full suite with .[dev]).

Option 2 seems cleaner since the test matrix already covers unit tests thoroughly.

The rest of the PR looks good — file deletions are correct, .isort.cfg updated, pyproject.toml cleaned up, test_metrics.py integration tests properly removed, README updated. No issues with the code changes themselves.

Comment thread .github/workflows/ci.yml
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step installs only pytest but runs unit tests that include async tests requiring pytest-asyncio. Either install pytest-asyncio too, or remove this test step from the build job (the test matrix already covers unit tests with full dev deps).

@hlin99-Review-BotX hlin99-Review-BotX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous CI issues (deleted directories referenced in workflow) are fixed, but the build job is still failing.

Problem: The build job step pip install pytest && python -m pytest tests/unit/ -v --tb=short installs only bare pytest, but several unit tests (test_discovery_models.py, test_pd_metrics.py) use @pytest.mark.anyio and require pytest-asyncio. This causes 20 test failures with async def functions are not natively supported.

Suggested fix: Either:

  1. Remove the unit test step from the build job entirely — the test matrix already runs the full suite with .[dev] deps. The build job purpose is to verify the wheel installs and xpyd --help works.
  2. Or install pytest-asyncio as well: pip install pytest pytest-asyncio.

Option 1 is cleaner since it avoids duplicating test coverage.

Also: no linked GitHub Issue in the PR description (noted in previous review as well).

@hlin99 hlin99 closed this Apr 6, 2026
@hlin99 hlin99 force-pushed the refactor/remove-integration-tests branch from f99078d to 01dce96 Compare April 6, 2026 12:18
@hlin99

hlin99 commented Apr 6, 2026

Copy link
Copy Markdown
Member Author

Fixed in 93d1033 — removed the redundant unit test step from the build job as suggested. The test matrix already covers unit tests with full dev deps. Build job now only verifies wheel install + xpyd --help.

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

Successfully merging this pull request may close these issues.

3 participants