Fix orm tests (#1099)

This commit is contained in:
An Tao 2021-12-01 11:18:35 +08:00 committed by GitHub
parent 8913abc400
commit 7cf0a64ab6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -41,7 +41,8 @@ DROGON_TEST(PostgreTest)
{ {
auto &clientPtr = postgreClient; auto &clientPtr = postgreClient;
// Prepare the test environment // Prepare the test environment
*clientPtr << "DROP TABLE IF EXISTS USERS" >> [TEST_CTX](const Result &r) { *clientPtr << "DROP TABLE IF EXISTS USERS" >> [TEST_CTX,
clientPtr](const Result &r) {
SUCCESS(); SUCCESS();
clientPtr->execSqlAsync( clientPtr->execSqlAsync(
"select 1 as result", "select 1 as result",
@ -696,7 +697,7 @@ DROGON_TEST(MySQLTest)
REQUIRE(clientPtr != nullptr); REQUIRE(clientPtr != nullptr);
// Prepare the test environment // Prepare the test environment
*clientPtr << "CREATE DATABASE IF NOT EXISTS drogonTestMysql" >> *clientPtr << "CREATE DATABASE IF NOT EXISTS drogonTestMysql" >>
[TEST_CTX](const Result &r) { [TEST_CTX, clientPtr](const Result &r) {
SUCCESS(); SUCCESS();
clientPtr->execSqlAsync( clientPtr->execSqlAsync(
"select 1 as result", "select 1 as result",
@ -1291,7 +1292,8 @@ DROGON_TEST(SQLite3Test)
REQUIRE(clientPtr != nullptr); REQUIRE(clientPtr != nullptr);
// Prepare the test environment // Prepare the test environment
*clientPtr << "DROP TABLE IF EXISTS users" >> [TEST_CTX](const Result &r) { *clientPtr << "DROP TABLE IF EXISTS users" >> [TEST_CTX,
clientPtr](const Result &r) {
SUCCESS(); SUCCESS();
clientPtr->execSqlAsync( clientPtr->execSqlAsync(
"select 1 as result", "select 1 as result",