Skip to content

fix(java): update inflight_requests_limit test for async Rust rejection#5658

Merged
avifenesh merged 1 commit intorelease-2.2from
fix/inflight-test-async-rejection
Mar 25, 2026
Merged

fix(java): update inflight_requests_limit test for async Rust rejection#5658
avifenesh merged 1 commit intorelease-2.2from
fix/inflight-test-async-rejection

Conversation

@avifenesh
Copy link
Member

Follow-up to #5656. With Java's inflight counter removed, rejection happens asynchronously in Rust's send_command() rather than synchronously in Java's AsyncRegistry.

The inflight_requests_limit integration test assumed synchronous rejection (the N+1th request is always the one rejected). With async Rust rejection, tokio task ordering is non-deterministic — any request may be rejected.

Fix: Wait for async processing, then count rejected requests instead of asserting specific ordering.

1 file changed, test-only.

@avifenesh avifenesh requested a review from a team as a code owner March 25, 2026 09:28
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@avifenesh avifenesh force-pushed the fix/inflight-test-async-rejection branch from f7a2107 to bd50b80 Compare March 25, 2026 09:30
@avifenesh avifenesh force-pushed the fix/inflight-test-async-rejection branch from bd50b80 to 88b3ac5 Compare March 25, 2026 09:35
@avifenesh avifenesh force-pushed the fix/inflight-test-async-rejection branch from 88b3ac5 to f3e5cd4 Compare March 25, 2026 10:28
With Java's inflight counter removed (PR #5656), rejection now happens
asynchronously in Rust's send_command() rather than synchronously in
Java's AsyncRegistry. The tokio task ordering is non-deterministic, so
any of the N+1 requests may be the one rejected — not necessarily the
last one sent.

Update the test to wait for async processing and count rejected
requests instead of asserting specific request ordering.

Signed-off-by: Avi Fenesh <[email protected]>
@avifenesh avifenesh force-pushed the fix/inflight-test-async-rejection branch from f3e5cd4 to c31b6b5 Compare March 25, 2026 10:29
@avifenesh avifenesh merged commit 9331bf4 into release-2.2 Mar 25, 2026
21 of 22 checks passed
@avifenesh avifenesh deleted the fix/inflight-test-async-rejection branch March 25, 2026 12:53
avifenesh added a commit that referenced this pull request Mar 25, 2026
avifenesh added a commit that referenced this pull request Mar 25, 2026
avifenesh added a commit that referenced this pull request Mar 25, 2026
… rejection (#5658)"

This reverts commit 9331bf4.

Signed-off-by: Avi Fenesh <[email protected]>
avifenesh added a commit that referenced this pull request Mar 25, 2026
* Revert "fix(java): update inflight_requests_limit test for async Rust rejection (#5658)"

This reverts commit 9331bf4.

Signed-off-by: Avi Fenesh <[email protected]>

* Revert "fix(java): remove Java-side inflight counter, let Rust be sole authority (#5656)"

This reverts commit 072ccdf.

Signed-off-by: Avi Fenesh <[email protected]>

---------

Signed-off-by: Avi Fenesh <[email protected]>
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.

2 participants