This is an automated email from the ASF dual-hosted git repository.
menghaoran 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 ae31db4 Fixed ReadwriteSplittingDataSourceRuleTest unit test. (#15988)
ae31db4 is described below
commit ae31db4003aa9da201e064c91e38b8b1a3b835fa
Author: zhaojinchao <[email protected]>
AuthorDate: Fri Mar 11 14:45:47 2022 +0800
Fixed ReadwriteSplittingDataSourceRuleTest unit test. (#15988)
* Fixed ReadwriteSplittingDataSourceRuleTest unit test.
* update
---
.../rule/ReadwriteSplittingDataSourceRuleTest.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingDataSourceRuleTest.java
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingDataSourceRuleTest.java
index 65d6bb2..3e272e7 100644
---
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingDataSourceRuleTest.java
+++
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingDataSourceRuleTest.java
@@ -21,6 +21,8 @@ import com.google.common.collect.ImmutableMap;
import
org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RandomReplicaLoadBalanceAlgorithm;
import
org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RoundRobinReplicaLoadBalanceAlgorithm;
import
org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingDataSourceRuleConfiguration;
+import org.apache.shardingsphere.readwritesplitting.spi.ReadwriteSplittingType;
+import org.apache.shardingsphere.spi.ShardingSphereServiceLoader;
import org.junit.Before;
import org.junit.Test;
@@ -37,6 +39,10 @@ public final class ReadwriteSplittingDataSourceRuleTest {
private ReadwriteSplittingDataSourceRule readwriteSplittingDataSourceRule;
+ static {
+ ShardingSphereServiceLoader.register(ReadwriteSplittingType.class);
+ }
+
@Before
public void setUp() {
readwriteSplittingDataSourceRule = new
ReadwriteSplittingDataSourceRule(