Skip to content

Add missing sync and new async integration tests #996

Draft
seherv wants to merge 27 commits intodapr:mainfrom
seherv:more-grpc-tests
Draft

Add missing sync and new async integration tests #996
seherv wants to merge 27 commits intodapr:mainfrom
seherv:more-grpc-tests

Conversation

@seherv
Copy link
Copy Markdown
Contributor

@seherv seherv commented Apr 28, 2026

Description

Adds tests for previously uncovered components and basic async tests for all components.

Also moves the custom wait_until() functions to a common module to deduplicate the code from tests/examples/.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #972

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

seherv and others added 23 commits April 27, 2026 13:58
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
# Conflicts:
#	tests/examples/conftest.py
#	tests/examples/test_configuration.py
#	tests/integration/AGENTS.md
#	tests/integration/conftest.py
#	tests/integration/test_configuration.py
#	tests/integration/test_distributed_lock.py
#	tests/integration/test_metadata.py
#	tests/integration/test_pubsub.py
#	tests/integration/test_secret_store.py
#	tests/integration/test_state_store.py
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.46%. Comparing base (bffb749) to head (8dd6ffb).
⚠️ Report is 115 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #996      +/-   ##
==========================================
- Coverage   86.63%   81.46%   -5.17%     
==========================================
  Files          84      139      +55     
  Lines        4473    13525    +9052     
==========================================
+ Hits         3875    11018    +7143     
- Misses        598     2507    +1909     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new sync/async pytest coverage for previously untested Dapr SDK building blocks, and centralizes common test utilities/fixtures to reduce duplication (per #972).

Changes:

  • Introduces tests/wait_utils.py (sync + async polling helpers) and updates tests to reuse it.
  • Adds new async integration test modules (aio client) plus expands/normalizes several sync integration tests.
  • Adds shared session fixtures (flush_redis, redis_set_config), pytest-asyncio auto mode, and new integration resources (binding/crypto/conversation components + key material).

Reviewed changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/wait_utils.py New shared sync/async polling helpers for tests.
tests/process_utils.py Updates subprocess/process-group helper docstring.
tests/integration/test_state_store_async.py New async state store smoke tests.
tests/integration/test_state_store.py Refactors to function-style tests; keeps state coverage.
tests/integration/test_secret_store_async.py New async secrets smoke tests.
tests/integration/test_pubsub_async.py New async pubsub publish/bulk publish tests using async polling.
tests/integration/test_pubsub.py Adds bulk publish + streaming/handler subscribe coverage; uses shared flush/polling.
tests/integration/test_metadata_async.py New async metadata tests.
tests/integration/test_metadata.py Refactors to function-style tests; keeps metadata coverage.
tests/integration/test_jobs_async.py New async jobs alpha API smoke tests.
tests/integration/test_invoke_binding_async.py New async output binding tests against localstorage binding.
tests/integration/test_invoke_async.py New async service invocation tests.
tests/integration/test_distributed_lock_async.py New async distributed lock alpha API tests.
tests/integration/test_distributed_lock.py Refactors to function-style tests; keeps lock coverage.
tests/integration/test_crypto_async.py New async crypto alpha API round-trip tests (RSA/AES).
tests/integration/test_conversation_async.py New async conversation alpha API smoke tests.
tests/integration/test_configuration_async.py New async configuration get tests.
tests/integration/test_configuration.py Refactors + adds race-focused xfail + improves subscribe test robustness.
tests/integration/resources/statestore.yaml Marks statestore as actor state store (workflow compatibility).
tests/integration/resources/localbinding.yaml Adds localstorage binding component for binding tests.
tests/integration/resources/cryptostore.yaml Adds localstorage crypto component for crypto tests.
tests/integration/resources/conversation.yaml Adds echo conversation component for conversation tests.
tests/integration/keys/symmetric-key-256 Adds symmetric key material for crypto tests.
tests/integration/keys/rsa-private-key.pem Adds RSA private key material for crypto tests.
tests/integration/conftest.py Sidecar lifecycle improvements; shared wait helper import; binding scratch-dir setup; sidecar-death fast-fail.
tests/integration/AGENTS.md Updates integration test documentation and directory layout.
tests/examples/test_pubsub_streaming_async.py Updates expected output lines for streaming example test.
tests/examples/test_langgraph_checkpointer.py Switches to shared wait helper; relies on shared redis flush fixture.
tests/examples/test_configuration.py Uses shared redis_set_config fixture to seed config store.
tests/examples/conftest.py Switches to tests.process_utils module.
tests/conftest.py New shared session fixtures for Redis flushing/config seeding.
pyproject.toml Enables pytest-asyncio asyncio_mode = "auto".
dev-requirements.txt Adds pytest-asyncio requirement (but missing redis dependency).
CLAUDE.md Updates repo guidance formatting/content.
.gitignore Ignores integration binding scratch directory.
Comments suppressed due to low confidence (1)

dev-requirements.txt:25

  • redis is imported/used by integration tests (e.g., tests/integration/test_configuration.py) but the redis PyPI package isn’t listed in dev-requirements.txt (there’s only a comment). Add an explicit dependency (e.g., redis>=...) so tox -e integration installs what the tests require.
# needed for direct Redis access in integration tests


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/integration/AGENTS.md Outdated
Comment thread tests/integration/test_pubsub.py
Comment thread tests/integration/test_jobs_async.py Outdated
Comment thread tests/integration/keys/symmetric-key-256 Outdated
Comment thread tests/integration/keys/rsa-private-key.pem Outdated
seherv added 3 commits April 28, 2026 21:03
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
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.

(parent) refactor: mv mechanical markdown tests to pytest native

2 participants