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 ebc7228  Fix test case (#8586)
ebc7228 is described below

commit ebc7228e60ffe9e22e0c58f043161b3c2dc1ded0
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Dec 12 05:45:10 2020 +0800

    Fix test case (#8586)
---
 .../proxy/initializer/impl/AbstractBootstrapInitializerTest.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/initializer/impl/AbstractBootstrapInitializerTest.java
 
b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/initializer/impl/AbstractBootstrapInitializerTest.java
index bd4de4c..1140045 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/initializer/impl/AbstractBootstrapInitializerTest.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/initializer/impl/AbstractBootstrapInitializerTest.java
@@ -20,6 +20,7 @@ package org.apache.shardingsphere.proxy.initializer.impl;
 import lombok.Getter;
 import lombok.Setter;
 import 
org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
+import 
org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey;
 import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
 import org.apache.shardingsphere.proxy.config.ProxyConfiguration;
 import org.apache.shardingsphere.proxy.config.YamlProxyConfiguration;
@@ -77,7 +78,8 @@ public abstract class AbstractBootstrapInitializerTest {
         
doReturn(mock(ProxyConfiguration.class)).when(abstractBootstrapInitializer).getProxyConfiguration(any());
         MetaDataContexts metaDataContexts = mock(MetaDataContexts.class);
         ConfigurationProperties props = mock(ConfigurationProperties.class);
-        when(props.getValue(any())).thenReturn(Boolean.FALSE);
+        
when(props.getValue(ConfigurationPropertyKey.PROXY_XA_TRANSACTION_MANAGER_TYPE)).thenReturn("atomikos");
+        
when(props.getValue(ConfigurationPropertyKey.PROXY_OPENTRACING_ENABLED)).thenReturn(Boolean.FALSE);
         when(metaDataContexts.getProps()).thenReturn(props);
         
doReturn(metaDataContexts).when(abstractBootstrapInitializer).decorateMetaDataContexts(any());
         
doReturn(mock(TransactionContexts.class)).when(abstractBootstrapInitializer).decorateTransactionContexts(any());

Reply via email to