From 8a44a7f6ed64d7cd3827517f65656e36288042f6 Mon Sep 17 00:00:00 2001 From: Chuxin Chen Date: Wed, 20 Sep 2023 14:22:27 +0800 Subject: [PATCH] Fix ci failed (#28470) --- .../metadata/data/loader/OpenGaussMetaDataLoaderTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/metadata/data/loader/OpenGaussMetaDataLoaderTest.java b/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/metadata/data/loader/OpenGaussMetaDataLoaderTest.java index 9b0ecaf786ba4..966a813652093 100644 --- a/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/metadata/data/loader/OpenGaussMetaDataLoaderTest.java +++ b/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/metadata/data/loader/OpenGaussMetaDataLoaderTest.java @@ -18,12 +18,14 @@ package org.apache.shardingsphere.infra.database.opengauss.metadata.data.loader; import org.apache.shardingsphere.infra.database.core.metadata.data.loader.DialectMetaDataLoader; +import org.apache.shardingsphere.infra.database.core.metadata.data.loader.MetaDataLoaderMaterial; import org.apache.shardingsphere.infra.database.core.metadata.data.model.ColumnMetaData; import org.apache.shardingsphere.infra.database.core.metadata.data.model.IndexMetaData; import org.apache.shardingsphere.infra.database.core.metadata.data.model.SchemaMetaData; import org.apache.shardingsphere.infra.database.core.metadata.data.model.TableMetaData; import org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPILoader; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; +import org.apache.shardingsphere.infra.database.opengauss.type.OpenGaussDatabaseType; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.junit.jupiter.api.Test; @@ -76,7 +78,7 @@ void assertLoadWithoutTables() throws SQLException { when(dataSource.getConnection().prepareStatement(BASIC_INDEX_META_DATA_SQL).executeQuery()).thenReturn(indexResultSet); ResultSet advanceIndexResultSet = mockAdvanceIndexMetaDataResultSet(); when(dataSource.getConnection().prepareStatement(ADVANCE_INDEX_META_DATA_SQL).executeQuery()).thenReturn(advanceIndexResultSet); - assertTableMetaDataMap(getDialectTableMetaDataLoader().load(dataSource, Collections.emptyList(), "sharding_db")); + assertTableMetaDataMap(getDialectTableMetaDataLoader().load(new MetaDataLoaderMaterial(Collections.emptyList(), dataSource, new OpenGaussDatabaseType(), "sharding_db"))); } private ResultSet mockSchemaMetaDataResultSet() throws SQLException { @@ -99,7 +101,7 @@ void assertLoadWithTables() throws SQLException { when(dataSource.getConnection().prepareStatement(BASIC_INDEX_META_DATA_SQL).executeQuery()).thenReturn(indexResultSet); ResultSet advanceIndexResultSet = mockAdvanceIndexMetaDataResultSet(); when(dataSource.getConnection().prepareStatement(ADVANCE_INDEX_META_DATA_SQL).executeQuery()).thenReturn(advanceIndexResultSet); - assertTableMetaDataMap(getDialectTableMetaDataLoader().load(dataSource, Collections.singletonList("tbl"), "sharding_db")); + assertTableMetaDataMap(getDialectTableMetaDataLoader().load(new MetaDataLoaderMaterial(Collections.singletonList("tbl"), dataSource, new OpenGaussDatabaseType(), "sharding_db"))); } private DataSource mockDataSource() throws SQLException {