From 90beb67dfa9adb7f46b0ddf3a111c0cc4995ba51 Mon Sep 17 00:00:00 2001 From: Sergey Yakubov <sergey.yakubov@desy.de> Date: Wed, 5 May 2021 08:55:18 +0200 Subject: [PATCH] fix test --- .../mongo_db/insert_retrieve/CMakeLists.txt | 12 ++++++------ .../insert_retrieve/insert_retrieve_mongodb.cpp | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/automatic/mongo_db/insert_retrieve/CMakeLists.txt b/tests/automatic/mongo_db/insert_retrieve/CMakeLists.txt index 18874f1eb..d1eef84c9 100644 --- a/tests/automatic/mongo_db/insert_retrieve/CMakeLists.txt +++ b/tests/automatic/mongo_db/insert_retrieve/CMakeLists.txt @@ -14,11 +14,11 @@ target_include_directories(${TARGET_NAME} PUBLIC ${ASAPO_CXX_COMMON_INCLUDE_DIR} ################################ add_test_cleanup(${TARGET_NAME}) add_integration_test(${TARGET_NAME} insertOK "OK 1" "OK 2") -#add_integration_test(${TARGET_NAME} insertFailsWhenNotConnected -# "Notconnected 3" -# "Notconnected 4") -#add_integration_test(${TARGET_NAME} insertFailsForDuplicateID -# "DuplicateID 6" -# "DuplicateID 5") +add_integration_test(${TARGET_NAME} insertFailsWhenNotConnected + "Notconnected 3" + "Notconnected 4") +add_integration_test(${TARGET_NAME} insertFailsForDuplicateID + "DuplicateID 6" + "DuplicateID 5") diff --git a/tests/automatic/mongo_db/insert_retrieve/insert_retrieve_mongodb.cpp b/tests/automatic/mongo_db/insert_retrieve/insert_retrieve_mongodb.cpp index 9bc16c7a6..a1eee5fb7 100644 --- a/tests/automatic/mongo_db/insert_retrieve/insert_retrieve_mongodb.cpp +++ b/tests/automatic/mongo_db/insert_retrieve/insert_retrieve_mongodb.cpp @@ -70,7 +70,7 @@ int main(int argc, char* argv[]) { Assert(err, args.keyword); - if (args.keyword == "OK") { // check retrieve + if (args.keyword == "OK") { // check retrieve and stream delete asapo::MessageMeta fi_db; asapo::MongoDBClient db_new; db_new.Connect("127.0.0.1", "data"); @@ -96,7 +96,8 @@ int main(int argc, char* argv[]) { db.DeleteStream("test"); err = db.GetStreamInfo("data_test", &info); M_AssertTrue(err!=nullptr); - + err = db.DeleteStream("test1"); + M_AssertTrue(err==nullptr); } return 0; -- GitLab