You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2020/08/07 11:36:28 UTC

[shardingsphere] branch master updated: fix proxy-backend test case (#6673)

This is an automated email from the ASF dual-hosted git repository.

panjuan 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 67a068b  fix proxy-backend test case (#6673)
67a068b is described below

commit 67a068bffe1fcb48ca0a6b58b354dbe574528e6e
Author: JingShang Lu <ji...@gmail.com>
AuthorDate: Fri Aug 7 19:36:13 2020 +0800

    fix proxy-backend test case (#6673)
---
 .../communication/jdbc/execute/RegistryCenterExecuteEngineTest.java  | 2 +-
 .../shardingsphere/proxy/backend/schema/ProxySchemaContextsTest.java | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/RegistryCenterExecuteEngineTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/RegistryCenterExecuteEngineTest.java
index 63c51ea..7416d0d 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/RegistryCenterExecuteEngineTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/RegistryCenterExecuteEngineTest.java
@@ -99,7 +99,7 @@ public final class RegistryCenterExecuteEngineTest {
         if (isOrchestration) {
             schemaContexts.set(ProxySchemaContexts.getInstance(), mock(OrchestrationSchemaContextsFixture.class));
         } else {
-            schemaContexts.set(ProxySchemaContexts.getInstance(), mock(StandardSchemaContexts.class));
+            schemaContexts.set(ProxySchemaContexts.getInstance(), new StandardSchemaContexts());
         }
     }
     
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContextsTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContextsTest.java
index e5de12f..a477f82 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContextsTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContextsTest.java
@@ -42,11 +42,6 @@ import static org.mockito.Mockito.when;
 public final class ProxySchemaContextsTest {
     
     @Test
-    public void assertGetDataSourceSampleEmpty() {
-        assertThat(ProxySchemaContexts.getInstance().getDataSourceSample(), is(Optional.empty()));
-    }
-    
-    @Test
     public void assertGetDataSourceSample() throws NoSuchFieldException, IllegalAccessException {
         Map<String, DataSource> mockDataSourceMap = new HashMap<>(2, 1);
         mockDataSourceMap.put("ds_1", new MockDataSource());