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

test: unbind xid in TransactionTemplateTest #6125

Merged
merged 3 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Add changes here for all PR submitted to the 2.x branch.

### test:
- [[#PR_NO](https://github.com/seata/seata/pull/PR_NO)] A brief and accurate description of PR
- [[#6125](https://github.com/seata/seata/pull/6125)] unbind xid in TransactionTemplateTest

Thanks to these contributors for their code commits. Please report an unintended omission.

Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

### test:
- [[#PR_NO](https://github.com/seata/seata/pull/PR_NO)] 准确简要的PR描述
- [[#6125](https://github.com/seata/seata/pull/6125)] TransactionTemplateTest单测unbind xid

非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。

Expand Down
2 changes: 2 additions & 0 deletions tm/src/test/java/io/seata/tm/api/TransactionTemplateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.LinkedHashSet;
import java.util.Set;

import io.seata.core.context.RootContext;
import io.seata.core.model.GlobalStatus;
import io.seata.core.model.TransactionManager;
import io.seata.tm.TransactionManagerHolder;
Expand Down Expand Up @@ -63,6 +64,7 @@ public void init() throws Exception {
txInfo.setTimeOut(DEFAULT_TIME_OUT);
txInfo.setName(DEFAULT_NAME);
when(transactionalExecutor.getTransactionInfo()).thenReturn(txInfo);
RootContext.unbind();
}

@AfterEach
Expand Down
Loading