From 84625174c418c2aa6c5e3b0fe3c5d60e1ad6cfc8 Mon Sep 17 00:00:00 2001 From: zhiru Date: Tue, 3 Sep 2019 16:32:00 +0800 Subject: [PATCH] fix mysql db test bug Former-commit-id: bd5f9aba465516029e510dd5b2ca5d1ce4a17052 --- cpp/CHANGELOG.md | 1 + cpp/unittest/db/utils.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 6dc98f20..0a408822 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -22,6 +22,7 @@ Please mark all change in change log and use the ticket from JIRA. - MS-461 - Mysql meta unittest failed - MS-462 - Run milvus server twices, should display error - MS-463 - Search timeout +- MS-467 - mysql db test failed ## Improvement - MS-327 - Clean code for milvus diff --git a/cpp/unittest/db/utils.cpp b/cpp/unittest/db/utils.cpp index bc9bf7db..7f30159c 100644 --- a/cpp/unittest/db/utils.cpp +++ b/cpp/unittest/db/utils.cpp @@ -124,7 +124,12 @@ zilliz::milvus::engine::DBMetaOptions MySQLTest::getDBMetaOptions() { zilliz::milvus::engine::Options MySQLDBTest::GetOptions() { auto options = engine::OptionsFactory::Build(); options.meta.path = "/tmp/milvus_test"; - options.meta.backend_uri = "mysql://root:Fantast1c@192.168.1.194:3306/"; + options.meta.backend_uri = DBTestEnvironment::getURI(); + + if(options.meta.backend_uri.empty()) { + options.meta.backend_uri = "mysql://root:Fantast1c@192.168.1.194:3306/"; + } + return options; } -- GitLab