From def2d1a2557551e5f65a3dfd438b5e2d42d0112a Mon Sep 17 00:00:00 2001 From: zhangliang Date: Wed, 4 Oct 2023 18:46:26 +0800 Subject: [PATCH] Fix test cases --- .../proxy/version/ShardingSphereProxyVersionTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/bootstrap/src/test/java/org/apache/shardingsphere/proxy/version/ShardingSphereProxyVersionTest.java b/proxy/bootstrap/src/test/java/org/apache/shardingsphere/proxy/version/ShardingSphereProxyVersionTest.java index cd4178533cb4a..758a49dd3a947 100644 --- a/proxy/bootstrap/src/test/java/org/apache/shardingsphere/proxy/version/ShardingSphereProxyVersionTest.java +++ b/proxy/bootstrap/src/test/java/org/apache/shardingsphere/proxy/version/ShardingSphereProxyVersionTest.java @@ -83,7 +83,9 @@ private ShardingSphereDatabase mockDatabase(final String databaseProductName, fi private ResourceMetaData mockResourceMetaData(final String databaseProductName, final String databaseProductVersion) throws SQLException { ResourceMetaData result = mock(ResourceMetaData.class, RETURNS_DEEP_STUBS); DataSource dataSource = createDataSource(databaseProductName, databaseProductVersion); - StorageUnitMetaData storageUnitMetaData = new StorageUnitMetaData("foo_db", mock(StorageNode.class, RETURNS_DEEP_STUBS), mock(DataSourcePoolProperties.class), dataSource); + DataSourcePoolProperties dataSourcePoolProps = mock(DataSourcePoolProperties.class, RETURNS_DEEP_STUBS); + when(dataSourcePoolProps.getConnectionPropertySynonyms().getStandardProperties()).thenReturn(Collections.emptyMap()); + StorageUnitMetaData storageUnitMetaData = new StorageUnitMetaData("foo_db", mock(StorageNode.class, RETURNS_DEEP_STUBS), dataSourcePoolProps, dataSource); when(result.getStorageUnitMetaDataMap()).thenReturn(Collections.singletonMap("foo_ds", storageUnitMetaData)); return result; }