Skip to content

Conversation

Pranjali-2501
Copy link
Contributor

@Pranjali-2501 Pranjali-2501 commented Sep 1, 2025

Partially addresses: #6113

Added TestCircuitBreaking and TestDropByCategory end2end Tests in xds/clusterimpl/tests Mirroring Existing Unit Test and delete them.

RELEASE NOTES: None

@Pranjali-2501 Pranjali-2501 self-assigned this Sep 1, 2025
@Pranjali-2501 Pranjali-2501 added this to the 1.76 Release milestone Sep 1, 2025
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.01%. Comparing base (29ba001) to head (a1d0ff8).
⚠️ Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8549      +/-   ##
==========================================
+ Coverage   82.00%   82.01%   +0.01%     
==========================================
  Files         413      415       +2     
  Lines       40523    40694     +171     
==========================================
+ Hits        33230    33377     +147     
- Misses       5909     5926      +17     
- Partials     1384     1391       +7     

see 30 files with indirect coverage changes

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

@Pranjali-2501 Pranjali-2501 changed the title xds/clusterimpl: add end2end Tests for xds/clusterimpl Mirroring Existing Unit Test Coverage. xds/clusterimpl: (WIP)add end2end Tests for xds/clusterimpl Mirroring Existing Unit Test Coverage. Sep 1, 2025
@Pranjali-2501 Pranjali-2501 changed the title xds/clusterimpl: (WIP)add end2end Tests for xds/clusterimpl Mirroring Existing Unit Test Coverage. xds/clusterimpl: add CircuitBreaking and Drop end2end Tests for xds/clusterimpl Mirroring Existing Unit Test Coverage. Sep 9, 2025
Copy link
Contributor

@easwars easwars left a comment

Choose a reason for hiding this comment

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

Please make your PR description comply with the suggestions from here: https://github.com/grpc/grpc-go/blob/master/CONTRIBUTING.md#pr-descriptions

Also, please consider changing your PR title to a shorter one that is more of a summary than being overly specific in it. Thanks.

@easwars easwars assigned Pranjali-2501 and unassigned easwars and arjan-bal Sep 10, 2025
@Pranjali-2501 Pranjali-2501 changed the title xds/clusterimpl: add CircuitBreaking and Drop end2end Tests for xds/clusterimpl Mirroring Existing Unit Test Coverage. xds/clusterimpl: add test covering drop-by-category and updated CircuitBreaking. Sep 14, 2025
@easwars easwars removed their assignment Sep 15, 2025
Copy link
Contributor

@easwars easwars left a comment

Choose a reason for hiding this comment

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

Also, same comment about the PR title as made in the other PR.

And, we should ideally be getting rid of the existing test as part of it moving it an e2e style, unless we have a good reason not to, in which case, it might make sense to include it in the PR description.

}
gotRPCDropRate := float64(cs.TotalDroppedRequests) / float64(rpcCount)
if (math.Trunc(math.Abs(gotRPCDropRate-wantRPCDropRate)*100) / 100) > errorTolerance {
t.Errorf("Drop rate goes out of errortolerance got: %v, want: %v, totalDroppedRequest: %v, totalIssuesRequest: %v", (math.Trunc(math.Abs(gotRPCDropRate-wantRPCDropRate)*100) / 100), errorTolerance, cs.TotalDroppedRequests, cs.UpstreamLocalityStats[0].TotalIssuedRequests)
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be easier to read (both in code and the output) as two separate error statements:

t.Errorf("Drop rate goes out of errortolerance got: %v, want: %v", (math.Trunc(math.Abs(gotRPCDropRate-wantRPCDropRate)*100) / 100), errorTolerance)

t.Errorf("totalDroppedRequest: %v, totalIssuesRequest: %v", cs.TotalDroppedRequests, cs.UpstreamLocalityStats[0].TotalIssuedRequests)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have moved this logic to a helper function and need to return as soon as it fails.

@easwars easwars assigned Pranjali-2501 and unassigned easwars Sep 22, 2025
Copy link
Contributor

@easwars easwars left a comment

Choose a reason for hiding this comment

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

Please update the PR title to be consistent with the other PR that you have outstanding.

@easwars easwars assigned Pranjali-2501 and unassigned easwars Sep 25, 2025
@Pranjali-2501 Pranjali-2501 changed the title xds/clusterimpl: add test covering drop-by-category and updated CircuitBreaking. xds/clusterimpl: Convert existing unit tests to e2e style (1/N) Sep 26, 2025
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.

3 participants