Skip to content

Commit

Permalink
fix unstable ut
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Jun 24, 2024
1 parent c5e5100 commit 347330b
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,13 @@ public void testNotHitSqlCache() throws Exception {
init((HMSExternalCatalog) mgr.getCatalog(HMS_CATALOG));
StatementBase parseStmt = parseAndAnalyzeStmt("select * from hms_ctl.hms_db.hms_tbl", connectContext);
List<ScanNode> scanNodes = Arrays.asList(hiveScanNode1);

CacheAnalyzer ca2 = new CacheAnalyzer(connectContext, parseStmt, scanNodes);
ca2.checkCacheMode(0);
long latestPartitionTime = ca2.getLatestTable().latestPartitionTime;

CacheAnalyzer ca = new CacheAnalyzer(connectContext, parseStmt, scanNodes);
ca.checkCacheMode(0);
ca.checkCacheMode(latestPartitionTime);
Assert.assertEquals(CacheAnalyzer.CacheMode.None, ca.getCacheMode());
}

Expand All @@ -527,8 +532,13 @@ public void testNotHitSqlCacheByNereids() {
init((HMSExternalCatalog) mgr.getCatalog(HMS_CATALOG));
StatementBase parseStmt = analyzeAndGetStmtByNereids("select * from hms_ctl.hms_db.hms_tbl", connectContext);
List<ScanNode> scanNodes = Arrays.asList(hiveScanNode1);

CacheAnalyzer ca2 = new CacheAnalyzer(connectContext, parseStmt, scanNodes);
ca2.checkCacheModeForNereids(0);
long latestPartitionTime = ca2.getLatestTable().latestPartitionTime;

CacheAnalyzer ca = new CacheAnalyzer(connectContext, parseStmt, scanNodes);
ca.checkCacheModeForNereids(0);
ca.checkCacheModeForNereids(latestPartitionTime);
Assert.assertEquals(CacheAnalyzer.CacheMode.None, ca.getCacheMode());
}

Expand Down

0 comments on commit 347330b

Please sign in to comment.