This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new f8da8b02b3b Add more unit tests (#20467)
f8da8b02b3b is described below
commit f8da8b02b3be0cbeb6ce8c9d9a19981d967bb9c0
Author: Da Xiang Huang <[email protected]>
AuthorDate: Tue Aug 23 19:59:35 2022 +0800
Add more unit tests (#20467)
---
.../transaction/core/TransactionTypeHolderTest.java | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git
a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/test/java/org/apache/shardingsphere/transaction/core/TransactionTypeHolderTest.java
b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/test/java/org/apache/shardingsphere/transaction/core/TransactionTypeHolderTest.java
index 04c9d8040af..2d6bfcbdc9c 100644
---
a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/test/java/org/apache/shardingsphere/transaction/core/TransactionTypeHolderTest.java
+++
b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/test/java/org/apache/shardingsphere/transaction/core/TransactionTypeHolderTest.java
@@ -37,10 +37,22 @@ public final class TransactionTypeHolderTest {
}
@Test
- public void assertGetWithSetValue() {
+ public void assertGetWithSetXaValue() {
TransactionTypeHolder.set(TransactionType.XA);
assertThat(TransactionTypeHolder.get(), is(TransactionType.XA));
}
+
+ @Test
+ public void assertGetWithSetLocalValue() {
+ TransactionTypeHolder.set(TransactionType.LOCAL);
+ assertThat(TransactionTypeHolder.get(), is(TransactionType.LOCAL));
+ }
+
+ @Test
+ public void assertGetWithSetBaseValue() {
+ TransactionTypeHolder.set(TransactionType.BASE);
+ assertThat(TransactionTypeHolder.get(), is(TransactionType.BASE));
+ }
@Test
public void assertClear() {