Repository navigation
test(lockservice): deflake RPC response tests - #25579
Merged
Merged
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: fixes matrixorigin#25578 ## What this PR does / why we need it: `TestRPCSendWithNotSupport` validates that an unregistered lockservice RPC method returns `moerr.ErrNotSupported`. Its request used a 100 ms context deadline, so a loaded CI runner could expire the context before the server response was decoded and fail with a transport/context error instead. This change: - introduces a shared 10-second upper bound for lockservice RPC tests that expect a concrete server response; - applies it to all comparable response-based tests that still used the fragile 100 ms deadline, including `TestRPCSendWithNotSupport`; - keeps the 100 ms deadline in `TestRequestCanBeFilter`, because timeout is the behavior that test intentionally validates; - reports the actual error type and value when the unsupported-method contract is violated. The longer deadline is only a hang guard and does not increase successful test duration. No production code, RPC timeout, retry behavior, or error handling is changed. ## Root Cause The 100 ms deadline tested CI scheduling and local RPC startup latency rather than the unsupported-method contract. Similar lockservice tests were extended to 10 seconds in matrixorigin#19412, but this test and several neighboring response-based tests were missed. ## Testing - `go test ./pkg/lockservice -run '^(TestRPCSend|TestSetRestartServiceRPCSend|TestAbortRemoteDeadlockTxnFailed|TestCanRestartServiceRPCSend|TestRemainTxnServiceRPCSend|TestRPCSendWithNotSupport|TestMOErrorCanHandled|TestRequestCanBeFilter|TestLockTableBindChanged)$' -count=100` - `go test -race ./pkg/lockservice -run '^(TestRPCSendWithNotSupport|TestRPCSend|TestRequestCanBeFilter)$' -count=20` - `go test ./pkg/lockservice -count=1` Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: fixes matrixorigin#25578 ## What this PR does / why we need it: `TestRPCSendWithNotSupport` validates that an unregistered lockservice RPC method returns `moerr.ErrNotSupported`. Its request used a 100 ms context deadline, so a loaded CI runner could expire the context before the server response was decoded and fail with a transport/context error instead. This change: - introduces a shared 10-second upper bound for lockservice RPC tests that expect a concrete server response; - applies it to all comparable response-based tests that still used the fragile 100 ms deadline, including `TestRPCSendWithNotSupport`; - keeps the 100 ms deadline in `TestRequestCanBeFilter`, because timeout is the behavior that test intentionally validates; - reports the actual error type and value when the unsupported-method contract is violated. The longer deadline is only a hang guard and does not increase successful test duration. No production code, RPC timeout, retry behavior, or error handling is changed. ## Root Cause The 100 ms deadline tested CI scheduling and local RPC startup latency rather than the unsupported-method contract. Similar lockservice tests were extended to 10 seconds in matrixorigin#19412, but this test and several neighboring response-based tests were missed. ## Testing - `go test ./pkg/lockservice -run '^(TestRPCSend|TestSetRestartServiceRPCSend|TestAbortRemoteDeadlockTxnFailed|TestCanRestartServiceRPCSend|TestRemainTxnServiceRPCSend|TestRPCSendWithNotSupport|TestMOErrorCanHandled|TestRequestCanBeFilter|TestLockTableBindChanged)$' -count=100` - `go test -race ./pkg/lockservice -run '^(TestRPCSendWithNotSupport|TestRPCSend|TestRequestCanBeFilter)$' -count=20` - `go test ./pkg/lockservice -count=1` Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: fixes matrixorigin#25578 ## What this PR does / why we need it: `TestRPCSendWithNotSupport` validates that an unregistered lockservice RPC method returns `moerr.ErrNotSupported`. Its request used a 100 ms context deadline, so a loaded CI runner could expire the context before the server response was decoded and fail with a transport/context error instead. This change: - introduces a shared 10-second upper bound for lockservice RPC tests that expect a concrete server response; - applies it to all comparable response-based tests that still used the fragile 100 ms deadline, including `TestRPCSendWithNotSupport`; - keeps the 100 ms deadline in `TestRequestCanBeFilter`, because timeout is the behavior that test intentionally validates; - reports the actual error type and value when the unsupported-method contract is violated. The longer deadline is only a hang guard and does not increase successful test duration. No production code, RPC timeout, retry behavior, or error handling is changed. ## Root Cause The 100 ms deadline tested CI scheduling and local RPC startup latency rather than the unsupported-method contract. Similar lockservice tests were extended to 10 seconds in matrixorigin#19412, but this test and several neighboring response-based tests were missed. ## Testing - `go test ./pkg/lockservice -run '^(TestRPCSend|TestSetRestartServiceRPCSend|TestAbortRemoteDeadlockTxnFailed|TestCanRestartServiceRPCSend|TestRemainTxnServiceRPCSend|TestRPCSendWithNotSupport|TestMOErrorCanHandled|TestRequestCanBeFilter|TestLockTableBindChanged)$' -count=100` - `go test -race ./pkg/lockservice -run '^(TestRPCSendWithNotSupport|TestRPCSend|TestRequestCanBeFilter)$' -count=20` - `go test ./pkg/lockservice -count=1` Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
fixes #25578
What this PR does / why we need it:
TestRPCSendWithNotSupportvalidates that an unregistered lockservice RPC method returnsmoerr.ErrNotSupported. Its request used a 100 ms context deadline, so a loaded CI runner could expire the context before the server response was decoded and fail with a transport/context error instead.This change:
TestRPCSendWithNotSupport;TestRequestCanBeFilter, because timeout is the behavior that test intentionally validates;The longer deadline is only a hang guard and does not increase successful test duration. No production code, RPC timeout, retry behavior, or error handling is changed.
Root Cause
The 100 ms deadline tested CI scheduling and local RPC startup latency rather than the unsupported-method contract. Similar lockservice tests were extended to 10 seconds in #19412, but this test and several neighboring response-based tests were missed.
Testing
go test ./pkg/lockservice -run '^(TestRPCSend|TestSetRestartServiceRPCSend|TestAbortRemoteDeadlockTxnFailed|TestCanRestartServiceRPCSend|TestRemainTxnServiceRPCSend|TestRPCSendWithNotSupport|TestMOErrorCanHandled|TestRequestCanBeFilter|TestLockTableBindChanged)$' -count=100go test -race ./pkg/lockservice -run '^(TestRPCSendWithNotSupport|TestRPCSend|TestRequestCanBeFilter)$' -count=20go test ./pkg/lockservice -count=1