wankunde commented on a change in pull request #543: fix tests failure
URL: https://github.com/apache/griffin/pull/543#discussion_r333562310
##########
File path:
service/src/test/java/org/apache/griffin/core/job/EventServiceTest.java
##########
@@ -59,6 +61,9 @@ Licensed to the Apache Software Foundation (ASF) under one
@Autowired
private List<GriffinEvent> eventList;
+ @MockBean
Review comment:
I don't know if the `IMetaStoreClient client` could be lazy initialized in
`HiveMetaStoreProxy` ?
```
@Bean
public IMetaStoreClient initHiveMetastoreClient() {
HiveConf hiveConf = new HiveConf();
hiveConf.set("hive.metastore.local", "false");
hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES,
3);
hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, uris);
hiveConf.setIntVar(HiveConf.ConfVars.HMSHANDLERATTEMPTS, attempts);
hiveConf.setVar(HiveConf.ConfVars.HMSHANDLERINTERVAL, interval);
try {
client = HiveMetaStoreClient.newSynchronizedClient(new
HiveMetaStoreClient(hiveConf));
} catch (Exception e) {
LOGGER.error("Failed to connect hive metastore. {}", e);
}
return client;
}
```
If not , `TestEntityManager` is been used in several test cases , Could we
create a new class to wrap it?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services