From 507444445f49c8ff6461fafc7db0f1536e9d0710 Mon Sep 17 00:00:00 2001 From: 924060929 <924060929@qq.com> Date: Fri, 23 Feb 2024 10:35:25 +0800 Subject: [PATCH] fix ut --- .../doris/external/hms/HmsCatalogTest.java | 20 +++++++++++++++++++ .../apache/doris/qe/HmsQueryCacheTest.java | 16 +++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/fe/fe-core/src/test/java/org/apache/doris/external/hms/HmsCatalogTest.java b/fe/fe-core/src/test/java/org/apache/doris/external/hms/HmsCatalogTest.java index 66e22fd4c1c64c..556297fa4f64a0 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/external/hms/HmsCatalogTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/external/hms/HmsCatalogTest.java @@ -127,6 +127,10 @@ private void createDbAndTableForHmsCatalog(HMSExternalCatalog hmsCatalog) { tbl.getType(); minTimes = 0; result = TableIf.TableType.HMS_EXTERNAL_TABLE; + + tbl.getDatabase(); + minTimes = 0; + result = db; } }; @@ -169,6 +173,10 @@ private void createDbAndTableForHmsCatalog(HMSExternalCatalog hmsCatalog) { view1.isSupportedHmsTable(); minTimes = 0; result = true; + + view1.getDatabase(); + minTimes = 0; + result = db; } }; @@ -211,6 +219,10 @@ private void createDbAndTableForHmsCatalog(HMSExternalCatalog hmsCatalog) { view2.isSupportedHmsTable(); minTimes = 0; result = true; + + view2.getDatabase(); + minTimes = 0; + result = db; } }; @@ -253,6 +265,10 @@ private void createDbAndTableForHmsCatalog(HMSExternalCatalog hmsCatalog) { view3.isSupportedHmsTable(); minTimes = 0; result = true; + + view3.getDatabase(); + minTimes = 0; + result = db; } }; @@ -295,6 +311,10 @@ private void createDbAndTableForHmsCatalog(HMSExternalCatalog hmsCatalog) { view4.isSupportedHmsTable(); minTimes = 0; result = true; + + view4.getDatabase(); + minTimes = 0; + result = db; } }; diff --git a/fe/fe-core/src/test/java/org/apache/doris/qe/HmsQueryCacheTest.java b/fe/fe-core/src/test/java/org/apache/doris/qe/HmsQueryCacheTest.java index 16de423b28d29d..61db0da9011069 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/qe/HmsQueryCacheTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/qe/HmsQueryCacheTest.java @@ -159,6 +159,10 @@ private void init(HMSExternalCatalog hmsCatalog) { // mock initSchemaAndUpdateTime and do nothing tbl.initSchemaAndUpdateTime(); minTimes = 0; + + tbl.getDatabase(); + minTimes = 0; + result = db; } }; @@ -203,6 +207,10 @@ private void init(HMSExternalCatalog hmsCatalog) { // mock initSchemaAndUpdateTime and do nothing tbl2.initSchemaAndUpdateTime(); minTimes = 0; + + tbl2.getDatabase(); + minTimes = 0; + result = db; } }; @@ -254,6 +262,10 @@ private void init(HMSExternalCatalog hmsCatalog) { view1.getUpdateTime(); minTimes = 0; result = NOW; + + view1.getDatabase(); + minTimes = 0; + result = db; } }; @@ -304,6 +316,10 @@ private void init(HMSExternalCatalog hmsCatalog) { view2.getUpdateTime(); minTimes = 0; result = NOW; + + view2.getDatabase(); + minTimes = 0; + result = db; } };