From 7cf0a64ab60029c993b412bd64da6084e6e4da93 Mon Sep 17 00:00:00 2001 From: An Tao Date: Wed, 1 Dec 2021 11:18:35 +0800 Subject: [PATCH] Fix orm tests (#1099) --- orm_lib/tests/db_test.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/orm_lib/tests/db_test.cc b/orm_lib/tests/db_test.cc index 86ec7183..53176c70 100644 --- a/orm_lib/tests/db_test.cc +++ b/orm_lib/tests/db_test.cc @@ -41,7 +41,8 @@ DROGON_TEST(PostgreTest) { auto &clientPtr = postgreClient; // 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(); clientPtr->execSqlAsync( "select 1 as result", @@ -696,7 +697,7 @@ DROGON_TEST(MySQLTest) REQUIRE(clientPtr != nullptr); // Prepare the test environment *clientPtr << "CREATE DATABASE IF NOT EXISTS drogonTestMysql" >> - [TEST_CTX](const Result &r) { + [TEST_CTX, clientPtr](const Result &r) { SUCCESS(); clientPtr->execSqlAsync( "select 1 as result", @@ -1291,7 +1292,8 @@ DROGON_TEST(SQLite3Test) REQUIRE(clientPtr != nullptr); // 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(); clientPtr->execSqlAsync( "select 1 as result",