Fix test compilation failures

The tests failed to compile due to invalid use of try_query. For some
reason this wasn't detected by newer compilers.

Also fixed the compilation failure of mxs1713_lots_of_database on CentOS
7.
This commit is contained in:
Markus Mäkelä
2018-07-02 12:44:10 +03:00
parent fa83901d03
commit ccdbfa8997
2 changed files with 32 additions and 24 deletions

View File

@ -43,9 +43,15 @@ int main(int argc, char** argv)
}
test.tprintf("Done!");
test.assert(errors.empty(), "None of the queries should fail: %s",
std::accumulate(errors.begin(), errors.end(), std::string(),
[](const std::string &a, const std::string &b){return a + b + " ";}));
auto combiner = [](std::string& a, std::string b)
{
a += b + " ";
return a;
};
std::string errstr;
std::accumulate(errors.begin(), errors.end(), errstr, combiner);
test.assert(errors.empty(), "None of the queries should fail: %s", errstr.c_str());
test.tprintf("Dropping databases...");
for (auto db : db_list)