diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index 333e0feeff1..9a21c03668a 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -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. diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index 60eb11af125..9c5ca89a878 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -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 的代码贡献。若有无意遗漏,请报告。 diff --git a/tm/src/test/java/io/seata/tm/api/TransactionTemplateTest.java b/tm/src/test/java/io/seata/tm/api/TransactionTemplateTest.java index 43dce648697..cc4c0a8ef09 100644 --- a/tm/src/test/java/io/seata/tm/api/TransactionTemplateTest.java +++ b/tm/src/test/java/io/seata/tm/api/TransactionTemplateTest.java @@ -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; @@ -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