Skip to content

Conversation

@artur-ciocanu
Copy link
Contributor

Description

Currently we have some very low level way to wait for Dapr container, we are relying on Wait.forLogMessage(...) it is OK, but it is not Dapr specific and could be brittle. The purpose of this PR is to add DaprWait that can wait for Dapr specific components to be up and running.

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: N/A

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

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
@artur-ciocanu artur-ciocanu requested review from a team as code owners December 23, 2025 22:16
Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
@artur-ciocanu
Copy link
Contributor Author

@dapr/maintainers-java-sdk @dapr/approvers-java-sdk could you please take a look at this PR. It adds a few primitives to Dapr Testcontainers so it is easier and more reliable to add integration tests using Testconainers.

@javier-aliaga please also take a look. Thank you!

…topic.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
@artur-ciocanu
Copy link
Contributor Author

@salaboy let me know what you think, I think it is a good addition to Dapr Testcontainers support.

@salaboy
Copy link
Collaborator

salaboy commented Dec 24, 2025

Yes this is amazing .. we need to get this in for 1.17

Copy link
Contributor

@siri-varma siri-varma left a comment

Choose a reason for hiding this comment

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

Neat strategy. LGTM.

@dapr-bot dapr-bot merged commit 18ea036 into dapr:master Jan 3, 2026
11 checks passed
@codecov
Copy link

codecov bot commented Jan 3, 2026

Codecov Report

❌ Patch coverage is 82.75862% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.75%. Comparing base (d759c53) to head (e5ca5f6).
⚠️ Report is 244 commits behind head on master.

Files with missing lines Patch % Lines
...ainers/wait/strategy/AbstractDaprWaitStrategy.java 27.27% 24 Missing ⚠️
...estcontainers/wait/strategy/ActorWaitStrategy.java 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1609      +/-   ##
============================================
+ Coverage     76.91%   78.75%   +1.84%     
- Complexity     1592     2035     +443     
============================================
  Files           145      225      +80     
  Lines          4843     6115    +1272     
  Branches        562      669     +107     
============================================
+ Hits           3725     4816    +1091     
- Misses          821      958     +137     
- Partials        297      341      +44     

☔ 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.

salaboy pushed a commit to salaboy/java-sdk that referenced this pull request Jan 5, 2026
* Create Dapr WaitStrategy to improve ITs ergonomics

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Improve unit tests naming and coverage

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix a potential NPE and remove extra "for..." methods for pubsub and topic.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE properly for actor match

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE another potential NPEs.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Rename to use wait strategy to use abstract prefix.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Add more tests to cover null checks

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix pubsub outbox IT.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Ignore pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Disable pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

---------

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
salaboy pushed a commit to salaboy/java-sdk that referenced this pull request Jan 7, 2026
* Create Dapr WaitStrategy to improve ITs ergonomics

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Improve unit tests naming and coverage

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix a potential NPE and remove extra "for..." methods for pubsub and topic.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE properly for actor match

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE another potential NPEs.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Rename to use wait strategy to use abstract prefix.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Add more tests to cover null checks

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix pubsub outbox IT.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Ignore pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Disable pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

---------

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
salaboy pushed a commit to salaboy/java-sdk that referenced this pull request Jan 7, 2026
* Create Dapr WaitStrategy to improve ITs ergonomics

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Improve unit tests naming and coverage

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix a potential NPE and remove extra "for..." methods for pubsub and topic.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE properly for actor match

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE another potential NPEs.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Rename to use wait strategy to use abstract prefix.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Add more tests to cover null checks

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix pubsub outbox IT.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Ignore pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Disable pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

---------

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
salaboy pushed a commit to salaboy/java-sdk that referenced this pull request Jan 7, 2026
* Create Dapr WaitStrategy to improve ITs ergonomics

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Improve unit tests naming and coverage

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix a potential NPE and remove extra "for..." methods for pubsub and topic.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE properly for actor match

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE another potential NPEs.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Rename to use wait strategy to use abstract prefix.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Add more tests to cover null checks

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix pubsub outbox IT.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Ignore pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Disable pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

---------

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
salaboy pushed a commit to salaboy/java-sdk that referenced this pull request Jan 7, 2026
* Create Dapr WaitStrategy to improve ITs ergonomics

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Improve unit tests naming and coverage

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix a potential NPE and remove extra "for..." methods for pubsub and topic.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE properly for actor match

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix NPE another potential NPEs.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Rename to use wait strategy to use abstract prefix.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Add more tests to cover null checks

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Fix pubsub outbox IT.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Ignore pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

* Disable pubsub outbox for now.

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>

---------

Signed-off-by: Artur Ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants