test(db): refactor SetUp

Former-commit-id: dfbb0f819705c0fca4b5e0a7fb37ce7bc52761d6
pull/191/head
Xu Peng 2019-04-29 19:05:48 +08:00
parent ed9dc51f27
commit 61854a6c23
2 changed files with 7 additions and 2 deletions

View File

@ -19,7 +19,7 @@ void ASSERT_STATS(engine::Status& stat) {
}
}
void DBTest::SetUp() {
void DBTest::InitLog() {
el::Configurations defaultConf;
defaultConf.setToDefault();
defaultConf.set(el::Level::Debug,
@ -27,8 +27,12 @@ void DBTest::SetUp() {
el::Loggers::reconfigureLogger("default", defaultConf);
}
void DBTest::SetUp() {
InitLog();
}
void MetaTest::SetUp() {
DBTest::SetUp();
InitLog();
impl_ = engine::DBMetaImplFactory::Build();
}

View File

@ -34,6 +34,7 @@ void ASSERT_STATS(zilliz::vecwise::engine::Status& stat);
class DBTest : public ::testing::Test {
protected:
void InitLog();
virtual void SetUp() override;
};