Former-commit-id: 338d1eb653c2b0726afe3ac19b2d62aefb5b0169
pull/191/head
zhiru 2019-07-01 17:11:33 +08:00
parent fb7505cbce
commit cdc47c3603
1 changed files with 25 additions and 22 deletions

View File

@ -72,7 +72,7 @@ TEST_F(MySQLDBTest, DB_TEST) {
std::thread search([&]() {
engine::QueryResults results;
int k = 10;
std::this_thread::sleep_for(std::chrono::seconds(2));
std::this_thread::sleep_for(std::chrono::seconds(3));
INIT_TIMER;
std::stringstream ss;
@ -91,6 +91,7 @@ TEST_F(MySQLDBTest, DB_TEST) {
ASSERT_STATS(stat);
for (auto k=0; k<qb; ++k) {
// std::cout << results[k][0].first << " " << target_ids[k] << std::endl;
ASSERT_EQ(results[k][0].first, target_ids[k]);
ss.str("");
ss << "Result [" << k << "]:";
@ -100,7 +101,7 @@ TEST_F(MySQLDBTest, DB_TEST) {
/* LOG(DEBUG) << ss.str(); */
}
ASSERT_TRUE(count >= prev_count);
std::this_thread::sleep_for(std::chrono::seconds(1));
std::this_thread::sleep_for(std::chrono::seconds(3));
}
});
@ -118,6 +119,8 @@ TEST_F(MySQLDBTest, DB_TEST) {
search.join();
// db_->DropAll();
delete db_;
auto dummyDB = engine::DBFactory::Build(options);