提交 61854a6c 编写于 作者: X Xu Peng

test(db): refactor SetUp


Former-commit-id: dfbb0f819705c0fca4b5e0a7fb37ce7bc52761d6
上级 ed9dc51f
...@@ -19,7 +19,7 @@ void ASSERT_STATS(engine::Status& stat) { ...@@ -19,7 +19,7 @@ void ASSERT_STATS(engine::Status& stat) {
} }
} }
void DBTest::SetUp() { void DBTest::InitLog() {
el::Configurations defaultConf; el::Configurations defaultConf;
defaultConf.setToDefault(); defaultConf.setToDefault();
defaultConf.set(el::Level::Debug, defaultConf.set(el::Level::Debug,
...@@ -27,8 +27,12 @@ void DBTest::SetUp() { ...@@ -27,8 +27,12 @@ void DBTest::SetUp() {
el::Loggers::reconfigureLogger("default", defaultConf); el::Loggers::reconfigureLogger("default", defaultConf);
} }
void DBTest::SetUp() {
InitLog();
}
void MetaTest::SetUp() { void MetaTest::SetUp() {
DBTest::SetUp(); InitLog();
impl_ = engine::DBMetaImplFactory::Build(); impl_ = engine::DBMetaImplFactory::Build();
} }
......
...@@ -34,6 +34,7 @@ void ASSERT_STATS(zilliz::vecwise::engine::Status& stat); ...@@ -34,6 +34,7 @@ void ASSERT_STATS(zilliz::vecwise::engine::Status& stat);
class DBTest : public ::testing::Test { class DBTest : public ::testing::Test {
protected: protected:
void InitLog();
virtual void SetUp() override; virtual void SetUp() override;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册