This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 18e6af5ed7f [fix](test) fix unstable refresh catalog/db ut (#38352)
18e6af5ed7f is described below
commit 18e6af5ed7f094b6e10b9ee710c184900c22e334
Author: Mingyu Chen <[email protected]>
AuthorDate: Thu Jul 25 15:19:44 2024 +0800
[fix](test) fix unstable refresh catalog/db ut (#38352)
Followup #38244
fix some unstable fe ut after set `use_meta_cache` as true
---
.../src/test/java/org/apache/doris/catalog/RefreshDbTest.java | 3 +++
.../test/java/org/apache/doris/datasource/RefreshCatalogTest.java | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/catalog/RefreshDbTest.java
b/fe/fe-core/src/test/java/org/apache/doris/catalog/RefreshDbTest.java
index fd920e9632c..fd7a6b1a24b 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/catalog/RefreshDbTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/RefreshDbTest.java
@@ -91,6 +91,9 @@ public class RefreshDbTest extends TestWithFeService {
}
long l3 = db1.getLastUpdateTime();
Assertions.assertTrue(l3 == l2);
+ // when use_meta_cache is true, the table will be recreated after
refresh.
+ // so we need to get table again
+ table = db1.getTable("tbl11").get();
Assertions.assertFalse(table.isObjectCreated());
test1.getDbNullable("db1").getTables();
Assertions.assertFalse(table.isObjectCreated());
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/datasource/RefreshCatalogTest.java
b/fe/fe-core/src/test/java/org/apache/doris/datasource/RefreshCatalogTest.java
index 87906261b24..34177f49382 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/datasource/RefreshCatalogTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/datasource/RefreshCatalogTest.java
@@ -145,9 +145,12 @@ public class RefreshCatalogTest extends TestWithFeService {
// not triggered init method
long l3 = test2.getLastUpdateTime();
Assertions.assertTrue(l3 == l2);
- // Assertions.assertFalse(table.isObjectCreated());
+ // when use_meta_cache is true, the table will be recreated after
refresh.
+ // so we need to get table again
+ table = (TestExternalTable)
test2.getDbNullable("db1").getTable("tbl11").get();
+ Assertions.assertFalse(table.isObjectCreated());
test2.getDbNullable("db1").getTables();
- // Assertions.assertFalse(table.isObjectCreated());
+ Assertions.assertFalse(table.isObjectCreated());
try {
DdlExecutor.execute(Env.getCurrentEnv(), refreshCatalogStmt);
} catch (Exception e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]