Skip to content
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

backend: add tests for prepared statements #33

Merged
merged 2 commits into from
Aug 9, 2022
Merged

backend: add tests for prepared statements #33

merged 2 commits into from
Aug 9, 2022

Conversation

djshow832
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #32

Problem Summary:
Add tests for forwarding prepared statements and check the status.

What is changed and how it works:

  • Add tests for forwarding prepared statements to see if they will hang.
  • Verify that all the response packets are forwarded to the client for all commands by checking the sequence.
  • Add tests for querying directly from the backend, which is currently used by show session_states.
  • Add tests for checking if the session is redirectable after executing prepared statements.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change (Don't forget to add the declarative for API)
  • Has weirctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@djshow832 djshow832 requested a review from xhebox August 9, 2022 07:50
Copy link
Collaborator

@xhebox xhebox left a comment

Choose a reason for hiding this comment

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

Rest LGTM

pkg/proxy/backend/testsuite_test.go Show resolved Hide resolved
pkg/proxy/backend/mock_client_test.go Outdated Show resolved Hide resolved
pkg/proxy/backend/cmd_processor_test.go Outdated Show resolved Hide resolved
@xhebox xhebox merged commit 898d46a into pingcap:main Aug 9, 2022
@djshow832 djshow832 deleted the query_cmd branch August 9, 2022 09:15
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.

Add tests for prepared statements
2 participants