Skip to content

test(at): add MySQL batch integration tests - #107

Merged
thunguo merged 2 commits into
apache:mainfrom
Vanillaxi:feat/AT-mysql-batch
Sep 3, 2026
Merged

thunguo merged 2 commits into
apache:mainfrom
Vanillaxi:feat/AT-mysql-batch

Conversation

@Vanillaxi

Copy link
Copy Markdown
Contributor

What this PR does:

  • Add MySQL AT semantic batch integration tests.
  • Verify managed batch commit and duplicate-key rollback.
  • Verify caller-owned batch participation in global rollback.
  • Register the batch case in the integration test runner.

Which issue(s) this PR fixes:
N/A

The related PR of seata-go

You should pay attention to items below to ensure your pr passes our ci test
We do not merge pr with ci tests failed

  • All ut passed (run 'go test ./...' in project root)
  • After go-fmt ed , run 'go fmt project' using goland.
  • Golangci-lint passed, run 'sudo golangci-lint run' in project root.
  • Your new-created file needs to have apache license at the top, like other existed file does.

@thunguo
thunguo requested review from thunguo and a lite review from Copilot September 3, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Adds a new MySQL AT semantic batch integration test case to validate Seata batch execution behavior under managed and caller-owned transaction scenarios, and wires the case into the integration runner.

Changes:

  • Register integrate_test/at/batch in the integration test runner script.
  • Add managed-batch integration checks for commit success and duplicate-key partial failure handling.
  • Add caller-owned transaction integration check that participates in a global rollback and verifies data restoration.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
start_integrate_test.sh Adds the new AT batch case to the integration test execution list.
integrate_test/at/batch/main.go Bootstraps the new batch integration suite, DB connection, and scenario execution.
integrate_test/at/batch/managed.go Implements managed-batch scenarios and shared fixture/assertion helpers.
integrate_test/at/batch/caller_owned.go Implements the caller-owned transaction scenario and polling helper for rollback verification.
integrate_test/at/batch/Makefile Adds a local runner target for the new integration case.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread integrate_test/at/batch/caller_owned.go
Comment thread integrate_test/at/batch/main.go
Comment thread integrate_test/at/batch/managed.go
Comment thread integrate_test/at/batch/managed.go

@thunguo thunguo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@thunguo
thunguo merged commit 8c7214f into apache:main Sep 3, 2026
6 checks passed
@Vanillaxi
Vanillaxi deleted the feat/AT-mysql-batch branch September 5, 2026 13:17
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.

3 participants