[fix](fe ut) Fix OlapQueryCacheTest failed (#27305)
1.
```
java.lang.NullPointerException: null
at org.apache.doris.catalog.Env.getCurrentSystemInfo(Env.java:793) ~[classes/:?]
at org.apache.doris.qe.SimpleScheduler$UpdateBlacklistThread.run(SimpleScheduler.java:206) ~[classes/:?]
at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_382]
java.lang.NullPointerException
at org.apache.doris.qe.OlapQueryCacheTest.setUp(OlapQueryCacheTest.java:226)
```
2.
```
[ERROR] testSqlCacheKeyWithNestedViewForNereids Time elapsed: 1.962 s <<< FAILURE!
java.lang.AssertionError: SELECT command denied to user 'testCluster:testUser'@'192.168.1.1' for table 'internal: testCluster:testDb: appevent'
at org.apache.doris.qe.OlapQueryCacheTest.parseSqlByNereids(OlapQueryCacheTest.java:579)
at org.apache.doris.qe.OlapQueryCacheTest.testSqlCacheKeyWithNestedViewForNereids(OlapQueryCacheTest.java:1338)
```
3.
```
[ERROR] Tests run: 28, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 113.63 s <<< FAILURE! - in org.apache.doris.qe.OlapQueryCacheTest
[ERROR] testCacheModeTable Time elapsed: 1.657 s <<< ERROR!
java.lang.IllegalArgumentException: Value of type org.apache.doris.qe.QueryState incompatible with return type org.apache.doris.system.SystemInfoService of org.apache.doris.catalog.Env#getCurrentSystemInfo()
at org.apache.doris.qe.OlapQueryCacheTest.setUp(OlapQueryCacheTest.java:156)
```
This commit is contained in:
@ -33,6 +33,7 @@ import org.apache.doris.journal.bdbje.BDBTool;
|
||||
import org.apache.doris.journal.bdbje.BDBToolOptions;
|
||||
import org.apache.doris.persist.meta.MetaReader;
|
||||
import org.apache.doris.qe.QeService;
|
||||
import org.apache.doris.qe.SimpleScheduler;
|
||||
import org.apache.doris.service.ExecuteEnv;
|
||||
import org.apache.doris.service.FeServer;
|
||||
import org.apache.doris.service.FrontendOptions;
|
||||
@ -194,6 +195,8 @@ public class DorisFE {
|
||||
Env.getCurrentEnv().setHttpReady(true);
|
||||
}
|
||||
|
||||
SimpleScheduler.init();
|
||||
|
||||
if (options.enableQeService) {
|
||||
QeService qeService = new QeService(Config.query_port, Config.arrow_flight_sql_port,
|
||||
ExecuteEnv.getInstance().getScheduler());
|
||||
|
||||
@ -53,7 +53,7 @@ public class SimpleScheduler {
|
||||
private static Map<Long, Pair<Integer, String>> blacklistBackends = Maps.newConcurrentMap();
|
||||
private static UpdateBlacklistThread updateBlacklistThread;
|
||||
|
||||
static {
|
||||
public static void init() {
|
||||
updateBlacklistThread = new UpdateBlacklistThread();
|
||||
updateBlacklistThread.start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user