diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java index c89d9554c627..d4d9edb98c53 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java @@ -3486,7 +3486,7 @@ interface SystemDAO { + "(SELECT COUNT(*) FROM dashboard_service_entity ) as dashboardServiceCount, " + "(SELECT COUNT(*) FROM pipeline_service_entity ) as pipelineServiceCount, " + "(SELECT COUNT(*) FROM mlmodel_service_entity ) as mlModelServiceCount, " - + "(SELECT COUNT(*) FROM storage_service_entity ) as storageServiceCount" + + "(SELECT COUNT(*) FROM storage_service_entity ) as storageServiceCount, " + "(SELECT COUNT(*) FROM search_service_entity ) as searchServiceCount") @RegisterRowMapper(ServicesCountRowMapper.class) ServicesCount getAggregatedServicesCount(@Define("cond") String cond) throws StatementException; diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/system/SystemResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/system/SystemResourceTest.java index 6b2b337f7b07..dcc8ef7d66ec 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/system/SystemResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/system/SystemResourceTest.java @@ -23,13 +23,7 @@ import org.junit.jupiter.api.TestInfo; import org.junit.jupiter.api.TestMethodOrder; import org.openmetadata.api.configuration.LogoConfiguration; -import org.openmetadata.schema.api.data.CreateContainer; -import org.openmetadata.schema.api.data.CreateDashboard; -import org.openmetadata.schema.api.data.CreateGlossary; -import org.openmetadata.schema.api.data.CreateGlossaryTerm; -import org.openmetadata.schema.api.data.CreatePipeline; -import org.openmetadata.schema.api.data.CreateTable; -import org.openmetadata.schema.api.data.CreateTopic; +import org.openmetadata.schema.api.data.*; import org.openmetadata.schema.api.services.CreateDashboardService; import org.openmetadata.schema.api.services.CreateDatabaseService; import org.openmetadata.schema.api.services.CreateMessagingService; @@ -57,6 +51,7 @@ import org.openmetadata.service.resources.glossary.GlossaryResourceTest; import org.openmetadata.service.resources.glossary.GlossaryTermResourceTest; import org.openmetadata.service.resources.pipelines.PipelineResourceTest; +import org.openmetadata.service.resources.searchindex.SearchIndexResourceTest; import org.openmetadata.service.resources.services.DashboardServiceResourceTest; import org.openmetadata.service.resources.services.DatabaseServiceResourceTest; import org.openmetadata.service.resources.services.MessagingServiceResourceTest; @@ -141,6 +136,10 @@ void entitiesCount(TestInfo test) throws HttpResponseException { CreateContainer createContainer = containerResourceTest.createRequest(test); containerResourceTest.createEntity(createContainer, ADMIN_AUTH_HEADERS); + SearchIndexResourceTest SearchIndexResourceTest = new SearchIndexResourceTest(); + CreateSearchIndex createSearchIndex = SearchIndexResourceTest.createRequest(test); + SearchIndexResourceTest.createEntity(createSearchIndex, ADMIN_AUTH_HEADERS); + GlossaryResourceTest glossaryResourceTest = new GlossaryResourceTest(); CreateGlossary createGlossary = glossaryResourceTest.createRequest(test); glossaryResourceTest.createEntity(createGlossary, ADMIN_AUTH_HEADERS);