morrySnow commented on code in PR #50855:
URL: https://github.com/apache/doris/pull/50855#discussion_r2092617066


##########
fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVPartitionUtilTest.java:
##########
@@ -296,4 +301,19 @@ public void testIsTableNamelike() {
         Assert.assertFalse(MTMVPartitionUtil.isTableNamelike(new 
TableName("db1"), tableNameToCheck));
         Assert.assertFalse(MTMVPartitionUtil.isTableNamelike(new 
TableName("ctl1"), tableNameToCheck));
     }
+
+    @Test
+    public void testGetTableSnapshotFromContext() throws AnalysisException {
+        Map<BaseTableInfo, MTMVSnapshotIf> cache = Maps.newHashMap();
+        new Expectations() {
+            {
+                context.getBaseTableSnapshotCache();
+                minTimes = 0;
+                result = cache;
+            }
+        };
+        Assert.assertTrue(cache.isEmpty());
+        MTMVPartitionUtil.getTableSnapshotFromContext(baseOlapTable, context);

Review Comment:
   should test cache's object is correct



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to