Skip to content

Migrate PubSub removing flaky test #1407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcruzdev
Copy link
Contributor

@mcruzdev mcruzdev commented Jun 7, 2025

Description

Use testcontainers for PubSub tests.

The main goal is to remove the following flaky test https://github.com/dapr/java-sdk/actions/runs/13773009141/job/38515768267#step:19:13432.

Closes one of the flaky test links related on the #1258 issue.

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: #[issue number]

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

@mcruzdev
Copy link
Contributor Author

mcruzdev commented Jun 7, 2025

@artur-ciocanu @cicoyle @salaboy

Trying to move the following test to use Testcontainers I got a problem.

public void testPubSubBulkSubscribe() throws Exception {
DaprRun daprRun = closeLater(startDaprApp(

When running the test from PubSub the following assert works well:

I have 1 message with the first message containing 10 statuses.

But using in-memory (Testcontainers) I have 10 messages and each one with 1 statuses.

I would like to know if the in-memory PubSub supports bulk message? The PubSub from DaprRun uses Redis

@mcruzdev mcruzdev marked this pull request as ready for review June 7, 2025 14:06
@mcruzdev mcruzdev requested review from a team as code owners June 7, 2025 14:06
@@ -0,0 +1,11 @@
package io.dapr.it.testcontainers.pubsub.http;
Copy link
Contributor

Choose a reason for hiding this comment

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

please add the header to all files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course, tomorrow early I will do it

@artur-ciocanu
Copy link
Contributor

@mcruzdev I will try to review ASAP, but could you please check why the ITs are failing?

@mcruzdev
Copy link
Contributor Author

@mcruzdev I will try to review ASAP, but could you please check why the ITs are failing?

It is another mapped flaky test

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.34%. Comparing base (d759c53) to head (b40a5b2).
Report is 165 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1407      +/-   ##
============================================
+ Coverage     76.91%   78.34%   +1.42%     
- Complexity     1592     1847     +255     
============================================
  Files           145      226      +81     
  Lines          4843     5707     +864     
  Branches        562      601      +39     
============================================
+ Hits           3725     4471     +746     
- Misses          821      916      +95     
- Partials        297      320      +23     

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

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