You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/09/02 01:43:16 UTC
[shardingsphere] branch master updated: Add broadcast table transaction test (#20716)
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 f2b8aa02525 Add broadcast table transaction test (#20716)
f2b8aa02525 is described below
commit f2b8aa02525ce6fa8f952f8e240f42177b7c5067
Author: ZhangCheng <fl...@outlook.com>
AuthorDate: Fri Sep 2 09:43:09 2022 +0800
Add broadcast table transaction test (#20716)
* Add broadcast table transaction test
* Fix
* Add final
---
.../BroadcastTableTransactionTestCase.java | 89 ++++++++++++++++++++++
.../engine/base/BaseTransactionITCase.java | 10 +++
.../engine/command/CommonSQLCommand.java | 6 ++
.../src/test/resources/env/common/command.xml | 14 ++++
.../src/test/resources/env/it-env.properties | 2 +-
.../env/jdbc/mysql/config-sharding-local.yaml | 2 +
.../jdbc/mysql/config-sharding-xa-atomikos.yaml | 2 +
.../jdbc/mysql/config-sharding-xa-bitronix.yaml | 2 +
.../jdbc/mysql/config-sharding-xa-narayana.yaml | 2 +
.../env/jdbc/opengauss/config-sharding-local.yaml | 2 +
.../opengauss/config-sharding-xa-atomikos.yaml | 2 +
.../opengauss/config-sharding-xa-bitronix.yaml | 2 +
.../opengauss/config-sharding-xa-narayana.yaml | 2 +
.../env/jdbc/postgresql/config-sharding-local.yaml | 2 +
.../postgresql/config-sharding-xa-atomikos.yaml | 2 +
.../postgresql/config-sharding-xa-bitronix.yaml | 2 +
.../postgresql/config-sharding-xa-narayana.yaml | 2 +
17 files changed, 144 insertions(+), 1 deletion(-)
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/BroadcastTableTransactionTestCase.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/BroadcastTableTransactionTestCase.java
new file mode 100644
index 00000000000..bf82b70b5b5
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/BroadcastTableTransactionTestCase.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.integration.transaction.cases.commitrollback;
+
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shardingsphere.integration.transaction.cases.base.BaseTransactionTestCase;
+import org.apache.shardingsphere.integration.transaction.engine.base.BaseTransactionITCase;
+import org.apache.shardingsphere.integration.transaction.engine.base.TransactionTestCase;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+
+/**
+ * Broadcast table transaction integration test.
+ */
+@Slf4j
+@TransactionTestCase
+public final class BroadcastTableTransactionTestCase extends BaseTransactionTestCase {
+
+ private static final String T_ADDRESS = "t_address";
+
+ public BroadcastTableTransactionTestCase(final BaseTransactionITCase baseTransactionITCase, final DataSource dataSource) {
+ super(baseTransactionITCase, dataSource);
+ }
+
+ @Override
+ @SneakyThrows(SQLException.class)
+ protected void beforeTest() {
+ super.beforeTest();
+ init();
+ }
+
+ @Override
+ @SneakyThrows(SQLException.class)
+ protected void afterTest() {
+ super.afterTest();
+ init();
+ }
+
+ @Override
+ @SneakyThrows(SQLException.class)
+ protected void executeTest() {
+ rollback();
+ commit();
+ }
+
+ private void init() throws SQLException {
+ Connection conn = getDataSource().getConnection();
+ executeWithLog(conn, "delete from t_address;");
+ assertTableRowCount(conn, T_ADDRESS, 0);
+ }
+
+ private void commit() throws SQLException {
+ Connection conn = getDataSource().getConnection();
+ conn.setAutoCommit(false);
+ executeWithLog(conn, "delete from t_address;");
+ assertTableRowCount(conn, T_ADDRESS, 0);
+ executeWithLog(conn, "INSERT INTO t_address (id, code, address) VALUES (1, '1', 'nanjing');");
+ assertTableRowCount(conn, T_ADDRESS, 1);
+ conn.commit();
+ }
+
+ private void rollback() throws SQLException {
+ Connection conn = getDataSource().getConnection();
+ conn.setAutoCommit(false);
+ executeWithLog(conn, "delete from t_address;");
+ assertTableRowCount(conn, T_ADDRESS, 0);
+ executeWithLog(conn, "INSERT INTO t_address (id, code, address) VALUES (1, '1', 'nanjing');");
+ assertTableRowCount(conn, T_ADDRESS, 1);
+ conn.commit();
+ }
+}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/base/BaseTransactionITCase.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/base/BaseTransactionITCase.java
index 785c9f88a2b..84d7a22fd82 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/base/BaseTransactionITCase.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/base/BaseTransactionITCase.java
@@ -68,6 +68,7 @@ public abstract class BaseTransactionITCase extends BaseITCase {
createOrderTable(conn);
createOrderItemTable(conn);
createAccountTable(conn);
+ createAddressTable(conn);
}
private void initTableRules() throws SQLException {
@@ -76,6 +77,7 @@ public abstract class BaseTransactionITCase extends BaseITCase {
createOrderItemTableRule(connection);
bindingShardingRule(connection);
createAccountTableRule(connection);
+ createAddressBroadcastTableRule(connection);
}
protected void createOrderTableRule(final Connection connection) throws SQLException {
@@ -90,6 +92,10 @@ public abstract class BaseTransactionITCase extends BaseITCase {
executeWithLog(connection, getCommonSQLCommand().getCreateAccountTableRule());
}
+ private void createAddressBroadcastTableRule(final Connection connection) throws SQLException {
+ executeWithLog(connection, getCommonSQLCommand().getCreateAddressBroadcastTableRule());
+ }
+
protected void bindingShardingRule(final Connection connection) throws SQLException {
executeWithLog(connection, "CREATE SHARDING BINDING TABLE RULES (t_order, t_order_item)");
}
@@ -118,6 +124,10 @@ public abstract class BaseTransactionITCase extends BaseITCase {
executeWithLog(connection, getCommonSQLCommand().getCreateOrderItemTable());
}
+ protected void createAddressTable(final Connection connection) throws SQLException {
+ executeWithLog(connection, getCommonSQLCommand().getCreateAddressTable());
+ }
+
protected void dropOrderItemTable(final Connection connection) throws SQLException {
executeWithLog(connection, "DROP TABLE IF EXISTS t_order_item;");
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/command/CommonSQLCommand.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/command/CommonSQLCommand.java
index 1a7923a31e8..ed455128c49 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/command/CommonSQLCommand.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/command/CommonSQLCommand.java
@@ -59,6 +59,9 @@ public final class CommonSQLCommand {
@XmlElement(name = "create-three-data-source-account-table-rule")
private String createThreeDataSourceAccountTableRule;
+ @XmlElement(name = "create-address-broadcast-table-rule")
+ private String createAddressBroadcastTableRule;
+
@XmlElement(name = "alter-local-transaction-rule")
private String alterLocalTransactionRule;
@@ -79,4 +82,7 @@ public final class CommonSQLCommand {
@XmlElement(name = "create-order-item-table")
private String createOrderItemTable;
+
+ @XmlElement(name = "create-address-table")
+ private String createAddressTable;
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/common/command.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/common/command.xml
index 1af836f50ad..3721cd02255 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/common/command.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/common/command.xml
@@ -89,6 +89,10 @@
)
</create-three-data-source-account-table-rule>
+ <create-address-broadcast-table-rule>
+ CREATE SHARDING BROADCAST TABLE RULES (t_address);
+ </create-address-broadcast-table-rule>
+
<alter-local-transaction-rule>
ALTER TRANSACTION RULE ( DEFAULT=LOCAL )
</alter-local-transaction-rule>
@@ -149,4 +153,14 @@
PRIMARY KEY (item_id)
)
</create-order-item-table>
+
+ <create-address-table>
+ CREATE TABLE IF NOT EXISTS t_address
+ (
+ id BIGINT NOT NULL,
+ code VARCHAR(36) DEFAULT NULL,
+ address VARCHAR(36) DEFAULT NULL,
+ PRIMARY KEY (id)
+ )
+ </create-address-table>
</command>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/it-env.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/it-env.properties
index d90407c2e43..93a2381aa21 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/it-env.properties
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/it-env.properties
@@ -17,7 +17,7 @@
# transaction.it.type=DOCKER,NATIVE
transaction.it.env.type=
# transaction.it.env.cases= MySQLAutoCommitTestCase, PostgresSQLAutoCommitTestCase, ClassicTransferTestCase, MultiTableCommitAndRollbackTestCase, SingleTableCommitAndRollbackTestCase, MySQLSetReadOnlyTestCase, MySQLSavePointTestCase, PostgreSQLSavePointTestCase
-transaction.it.env.cases=ExceptionInTransactionTestCase, MultiTableCommitAndRollbackTestCase, SingleTableCommitAndRollbackTestCase, MySQLSetReadOnlyTestCase, MySQLSavePointTestCase, MySQLLocalTruncateTestCase, MySQLXATruncateTestCase
+transaction.it.env.cases=BroadcastTableTransactionTestCase, ExceptionInTransactionTestCase, MultiTableCommitAndRollbackTestCase, SingleTableCommitAndRollbackTestCase, MySQLSetReadOnlyTestCase, MySQLSavePointTestCase, MySQLLocalTruncateTestCase, MySQLXATruncateTestCase
# transaction.it.env.transtypes=LOCAL, XA, BASE
transaction.it.env.transtypes=LOCAL, XA
# transaction.it.env.xa.providers=Atomikos, Bitronix, Narayana
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-local.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-local.yaml
index 733ffe4fbb7..b59153145dd 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-local.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-local.yaml
@@ -60,6 +60,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-atomikos.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-atomikos.yaml
index 949ad464755..2ad3f77d79a 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-atomikos.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-atomikos.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-bitronix.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-bitronix.yaml
index 63a50867e42..470f2f1351e 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-bitronix.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-bitronix.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-narayana.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-narayana.yaml
index ed00975db3c..6ff537dd448 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-narayana.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/mysql/config-sharding-xa-narayana.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-local.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-local.yaml
index 733ffe4fbb7..b59153145dd 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-local.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-local.yaml
@@ -60,6 +60,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-atomikos.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-atomikos.yaml
index 949ad464755..2ad3f77d79a 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-atomikos.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-atomikos.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-bitronix.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-bitronix.yaml
index 63a50867e42..470f2f1351e 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-bitronix.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-bitronix.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-narayana.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-narayana.yaml
index ed00975db3c..6ff537dd448 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-narayana.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/opengauss/config-sharding-xa-narayana.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-local.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-local.yaml
index 733ffe4fbb7..b59153145dd 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-local.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-local.yaml
@@ -60,6 +60,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-atomikos.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-atomikos.yaml
index 949ad464755..2ad3f77d79a 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-atomikos.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-atomikos.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-bitronix.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-bitronix.yaml
index 63a50867e42..470f2f1351e 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-bitronix.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-bitronix.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-narayana.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-narayana.yaml
index ed00975db3c..6ff537dd448 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-narayana.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/resources/env/jdbc/postgresql/config-sharding-xa-narayana.yaml
@@ -61,6 +61,8 @@ rules:
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item
+ broadcastTables:
+ - t_address
defaultDatabaseStrategy:
standard:
shardingColumn: user_id