Skip to content

Conversation

@emreyigit
Copy link
Member

@emreyigit emreyigit commented Dec 10, 2025

The PR;

  • Fixes the flakiness of TestReliableTopicUnderStress by throwing operation cancelled while publishing in blocking policy. If the operation is cancelled during blocking publish, the API were doing nothing. Hence, test assumed that message is sent, and it was failing occasionally if the operation just cancelled before after API called. Java doesn't notify operation cancelled because it doesn't track the status.
    https://github.com/hazelcast/hazelcast-mono/blob/master/hazelcast/hazelcast/src/main/java/com/hazelcast/client/impl/proxy/ClientReliableTopicProxy.java#L148-L162

  • Decreased log level of operation cancelled logs which is written when the message executer is disposed. It happens when executer unsubscribed or client is disposed when there is a active subscription.

  • Refactored creating client options in the reliable topic test for better readability.

closes #971
closes #969

@emreyigit emreyigit self-assigned this Dec 10, 2025
@emreyigit emreyigit added the Type: Defect Issue is a Defect ie a Bug that needs to be fixed. label Dec 10, 2025
@emreyigit emreyigit added this to the 5.7.0 milestone Dec 10, 2025
@emreyigit emreyigit requested a review from ihsandemir December 10, 2025 09:14
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.57%. Comparing base (986832b) to head (6748f64).

Files with missing lines Patch % Lines
...cast.Net/DistributedObjects/Impl/HReliableTopic.cs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1027      +/-   ##
==========================================
- Coverage   82.63%   82.57%   -0.07%     
==========================================
  Files        1054     1054              
  Lines       25429    25434       +5     
==========================================
- Hits        21014    21002      -12     
- Misses       4415     4432      +17     

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

if (wait > _backOffMax) wait = _backOffMax;
}

if (cancellationToken.IsCancellationRequested)
Copy link
Collaborator

Choose a reason for hiding this comment

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

according to above loop when code is at this line it is guaranteed that cancellationToken.IsCancellationRequested is true, right? no need for if check.

Copy link
Member Author

@emreyigit emreyigit Dec 12, 2025

Choose a reason for hiding this comment

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

Well, that's the crunch time. When token is cancelled, the loop above breaks even invocation is not called yet. If we don't throw, the caller of the method thinks the operation is completed but it's not. We even have not tried yet, so this exception is crucial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Defect Issue is a Defect ie a Bug that needs to be fixed.

Projects

None yet

2 participants