diff --git a/core/src/ten_runtime/extension_group/builtin/builtin_extension_group.c b/core/src/ten_runtime/extension_group/builtin/builtin_extension_group.c index 457e735c3..9229d0b59 100644 --- a/core/src/ten_runtime/extension_group/builtin/builtin_extension_group.c +++ b/core/src/ten_runtime/extension_group/builtin/builtin_extension_group.c @@ -99,7 +99,7 @@ static void on_addon_create_extension_done(ten_env_t *ten_env, } else { // Failed to create the specified extension. - TEN_LOGI( + TEN_LOGE( "Failed to create extension %s", ten_string_get_raw_str(&create_extension_done_ctx->extension_name)); diff --git a/core/src/ten_runtime/extension_thread/extension_thread.c b/core/src/ten_runtime/extension_thread/extension_thread.c index 954e0fffb..db65b4d8a 100644 --- a/core/src/ten_runtime/extension_thread/extension_thread.c +++ b/core/src/ten_runtime/extension_thread/extension_thread.c @@ -507,6 +507,9 @@ static void ten_engine_on_all_extension_threads_are_ready( ten_shared_ptr_t *cmd_result = NULL; if (error_occurred) { + TEN_LOGE("[%s] Failed to start the graph successfully, shutting it down.", + ten_engine_get_id(self, true)); + cmd_result = ten_cmd_result_create_from_cmd(TEN_STATUS_CODE_ERROR, state_requester_cmd); } else { diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_basic_1.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_basic_1.cc index a6de7131c..1178289b5 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_basic_1.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_basic_1.cc @@ -80,7 +80,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(predefined_graph_basic_1__predefined_graph, } // namespace -TEST(ExtensionTest, PredefinedGraphBasic1) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphBasic1) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_basic_2.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_basic_2.cc index a50ef4bf6..4e08e0b51 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_basic_2.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_basic_2.cc @@ -177,7 +177,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(predefined_graph_basic_2__normal_extension, } // namespace -TEST(ExtensionTest, PredefinedGraphBasic2) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphBasic2) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_engine_own_eventloop.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_engine_own_eventloop.cc index d486ca43b..6427bb294 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_engine_own_eventloop.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_engine_own_eventloop.cc @@ -84,7 +84,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, PredefinedGraphEngineOwnEventloop) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphEngineOwnEventloop) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_incorrect_1.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_incorrect_1.cc new file mode 100644 index 000000000..b0df5a59c --- /dev/null +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_incorrect_1.cc @@ -0,0 +1,102 @@ +// +// Copyright © 2025 Agora +// This file is part of TEN Framework, an open source project. +// Licensed under the Apache License, Version 2.0, with certain conditions. +// Refer to the "LICENSE" file in the root directory for more information. +// +#include "gtest/gtest.h" +#include "include_internal/ten_runtime/binding/cpp/ten.h" +#include "tests/common/client/cpp/msgpack_tcp.h" +#include "tests/ten_runtime/smoke/util/binding/cpp/check.h" + +namespace { + +class test_predefined_graph : public ten::extension_t { + public: + explicit test_predefined_graph(const char *name) : ten::extension_t(name) {} + + void on_cmd(ten::ten_env_t &ten_env, + std::unique_ptr cmd) override { + nlohmann::json const detail = {{"id", 1}, {"name", "a"}}; + + auto cmd_result = ten::cmd_result_t::create(TEN_STATUS_CODE_OK); + cmd_result->set_property_from_json("detail", detail.dump().c_str()); + ten_env.return_result(std::move(cmd_result), std::move(cmd)); + } +}; + +class test_app : public ten::app_t { + public: + void on_configure(ten::ten_env_t &ten_env) override { + bool rc = ten::ten_env_internal_accessor_t::init_manifest_from_json( + ten_env, + // clang-format off + R"({ + "type": "app", + "name": "test_app", + "version": "0.1.0" + })" + // clang-format on + ); + ASSERT_EQ(rc, true); + + rc = ten_env.init_property_from_json( + // clang-format off + R"###({ + "_ten": { + "uri": "msgpack://127.0.0.1:8001/", + "log_level": 2, + "predefined_graphs": [{ + "name": "default", + "auto_start": true, + "singleton": true, + "nodes": [{ + "type": "extension", + "name": "predefined_graph", + "addon": "predefined_graph_incorrect_1__predefined_graph", + "extension_group": "predefined_graph_group" + }] + }] + } + })###" + // clang-format on + ); + ASSERT_EQ(rc, true); + + ten_env.on_configure_done(); + } +}; + +void *app_thread_main(TEN_UNUSED void *args) { + auto *app = new test_app(); + app->run(); + delete app; + + return nullptr; +} + +TEN_CPP_REGISTER_ADDON_AS_EXTENSION( + predefined_graph_incorrect_1__predefined_graph, test_predefined_graph); + +} // namespace + +TEST(PredefinedGraphTest, PredefinedGraphIncorrect1) { // NOLINT + auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); + + // Create a client and connect to the app. + auto *client = new ten::msgpack_tcp_client_t("msgpack://127.0.0.1:8001/"); + + // Do not need to send 'start_graph' command first. + // The 'graph_id' MUST be "default" if we want to send the request to + // predefined graph. + auto test_cmd = ten::cmd_t::create("test"); + test_cmd->set_dest("msgpack://127.0.0.1:8001/", "default", + "predefined_graph_group", "predefined_graph"); + auto cmd_result = client->send_cmd_and_recv_result(std::move(test_cmd)); + ten_test::check_status_code(cmd_result, TEN_STATUS_CODE_OK); + ten_test::check_detail_with_json(cmd_result, R"({"id": 1, "name": "a"})"); + + delete client; + + ten_thread_join(app_thread, -1); +} diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_app.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_app.cc index 0d32e6739..1abeb5cf4 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_app.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_app.cc @@ -139,7 +139,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(predefined_graph_multi_app__extension_2, } // namespace -TEST(ExtensionTest, PredefinedGraphMultiApp) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphMultiApp) { // NOLINT // Start app. auto *app_1_thread = ten_thread_create("app thread 1", app_thread_1_main, nullptr); diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_1.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_1.cc index 89118c48a..865f52a17 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_1.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_1.cc @@ -117,7 +117,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, PredefinedGraphMultiExtension1) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphMultiExtension1) { // NOLINT // Start app. auto *app_thread = ten_thread_create("app thread", test_app_thread_main, nullptr); diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_2.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_2.cc index 7b4937390..386100a3e 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_2.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_2.cc @@ -114,7 +114,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, PredefinedGraphMultiExtension2) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphMultiExtension2) { // NOLINT // Start app. auto *app_thread = ten_thread_create("app thread", test_app_thread_main, nullptr); diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_3.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_3.cc index 67bd2e5b7..374174821 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_3.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_3.cc @@ -113,7 +113,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, PredefinedGraphMultiExtension3) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphMultiExtension3) { // NOLINT // Start app. auto *app_thread = ten_thread_create("app thread", test_app_thread_main, nullptr); diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_4.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_4.cc index 21d509e73..1b46d6ed3 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_4.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_multi_extension_4.cc @@ -152,7 +152,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, PredefinedGraphMultiExtension4) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphMultiExtension4) { // NOLINT // Start app. auto *app_thread = ten_thread_create("app thread", test_app_thread_main, nullptr); diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_no_auto_start.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_no_auto_start.cc index 89718ca49..e1fa4fe9c 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_no_auto_start.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_no_auto_start.cc @@ -81,7 +81,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, PredefinedGraphNoAutoStart) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphNoAutoStart) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_two_standalone_extensions_1.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_two_standalone_extensions_1.cc index d44d1cde7..cbd20c410 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_two_standalone_extensions_1.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_two_standalone_extensions_1.cc @@ -83,7 +83,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(prebuild_two_extensions_1, } // namespace -TEST(ExtensionTest, PredefinedGraphTwoStandaloneExtensions1) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphTwoStandaloneExtensions1) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_two_standalone_extensions_2.cc b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_two_standalone_extensions_2.cc index 50215b067..0ea767369 100644 --- a/tests/ten_runtime/smoke/predefined_graph/predefined_graph_two_standalone_extensions_2.cc +++ b/tests/ten_runtime/smoke/predefined_graph/predefined_graph_two_standalone_extensions_2.cc @@ -83,7 +83,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(prebuild_two_extensions_2, } // namespace -TEST(ExtensionTest, PredefinedGraphTwoStandaloneExtensions2) { // NOLINT +TEST(PredefinedGraphTest, PredefinedGraphTwoStandaloneExtensions2) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/start_graph/start_graph_and_communicate.cc b/tests/ten_runtime/smoke/start_graph/start_graph_and_communicate.cc index 1a47a8af3..ae4c87d61 100644 --- a/tests/ten_runtime/smoke/start_graph/start_graph_and_communicate.cc +++ b/tests/ten_runtime/smoke/start_graph/start_graph_and_communicate.cc @@ -172,7 +172,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, StartGraphAndCommunication) { // NOLINT +TEST(StartGraphTest, StartGraphAndCommunication) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/start_graph/start_graph_from_extension.cc b/tests/ten_runtime/smoke/start_graph/start_graph_from_extension.cc index 08ff21e84..4dca6069e 100644 --- a/tests/ten_runtime/smoke/start_graph/start_graph_from_extension.cc +++ b/tests/ten_runtime/smoke/start_graph/start_graph_from_extension.cc @@ -151,7 +151,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, StartGraphFromExtension) { // NOLINT +TEST(StartGraphTest, StartGraphFromExtension) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/start_graph/start_incorrect_graph.cc b/tests/ten_runtime/smoke/start_graph/start_incorrect_graph_1.cc similarity index 91% rename from tests/ten_runtime/smoke/start_graph/start_incorrect_graph.cc rename to tests/ten_runtime/smoke/start_graph/start_incorrect_graph_1.cc index 68961edcf..ca97c88b5 100644 --- a/tests/ten_runtime/smoke/start_graph/start_incorrect_graph.cc +++ b/tests/ten_runtime/smoke/start_graph/start_incorrect_graph_1.cc @@ -30,7 +30,7 @@ class test_predefined_graph : public ten::extension_t { "name": "normal_extension", "addon": "not_existed_extension_addon", "app": "msgpack://127.0.0.1:8001/", - "extension_group": "start_incorrect_graph__normal_extension_group" + "extension_group": "start_incorrect_graph_1__normal_extension_group" }] })"_json.dump() .c_str()); @@ -111,8 +111,8 @@ class test_app : public ten::app_t { "nodes": [{ "type": "extension", "name": "predefined_graph", - "addon": "start_incorrect_graph__predefined_graph_extension", - "extension_group": "start_incorrect_graph__predefined_graph_group" + "addon": "start_incorrect_graph_1__predefined_graph_extension", + "extension_group": "start_incorrect_graph_1__predefined_graph_group" }] }] } @@ -134,13 +134,13 @@ void *app_thread_main(TEN_UNUSED void *args) { } TEN_CPP_REGISTER_ADDON_AS_EXTENSION( - start_incorrect_graph__predefined_graph_extension, test_predefined_graph); -TEN_CPP_REGISTER_ADDON_AS_EXTENSION(start_incorrect_graph__normal_extension, + start_incorrect_graph_1__predefined_graph_extension, test_predefined_graph); +TEN_CPP_REGISTER_ADDON_AS_EXTENSION(start_incorrect_graph_1__normal_extension, test_normal_extension); } // namespace -TEST(ExtensionTest, StartIncorrectGraph) { // NOLINT +TEST(StartGraphTest, StartIncorrectGraph1) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. @@ -151,7 +151,7 @@ TEST(ExtensionTest, StartIncorrectGraph) { // NOLINT // request to predefined graph. auto test_cmd = ten::cmd_t::create("test"); test_cmd->set_dest("msgpack://127.0.0.1:8001/", "default", - "start_incorrect_graph__predefined_graph_group", + "start_incorrect_graph_1__predefined_graph_group", "predefined_graph"); auto cmd_result = client->send_cmd_and_recv_result(std::move(test_cmd)); ten_test::check_status_code(cmd_result, TEN_STATUS_CODE_OK); diff --git a/tests/ten_runtime/smoke/start_graph/start_incorrect_graph_2.cc b/tests/ten_runtime/smoke/start_graph/start_incorrect_graph_2.cc new file mode 100644 index 000000000..94593e951 --- /dev/null +++ b/tests/ten_runtime/smoke/start_graph/start_incorrect_graph_2.cc @@ -0,0 +1,169 @@ +// +// Copyright © 2025 Agora +// This file is part of TEN Framework, an open source project. +// Licensed under the Apache License, Version 2.0, with certain conditions. +// Refer to the "LICENSE" file in the root directory for more information. +// +#include "gtest/gtest.h" +#include "include_internal/ten_runtime/binding/cpp/ten.h" +#include "ten_runtime/common/status_code.h" +#include "tests/common/client/cpp/msgpack_tcp.h" +#include "tests/ten_runtime/smoke/util/binding/cpp/check.h" + +namespace { + +class test_normal_extension : public ten::extension_t { + public: + explicit test_normal_extension(const char *name) : ten::extension_t(name) {} +}; + +class test_predefined_graph : public ten::extension_t { + public: + explicit test_predefined_graph(const char *name) : ten::extension_t(name) {} + + void on_start(ten::ten_env_t &ten_env) override { + auto start_graph_cmd = ten::cmd_start_graph_t::create(); + start_graph_cmd->set_dest("localhost", nullptr, nullptr, nullptr); + start_graph_cmd->set_graph_from_json(R"({ + "nodes": [{ + "type": "extension", + "name": "non_existed_extension", + "addon": "not_existed_extension_addon", + "app": "msgpack://127.0.0.1:8001/", + "extension_group": "start_incorrect_graph_2__normal_extension_group" + },{ + "type": "extension", + "name": "normal_extension", + "addon": "start_incorrect_graph_2__normal_extension", + "app": "msgpack://127.0.0.1:8001/", + "extension_group": "start_incorrect_graph_2__normal_extension_group" + }] + })"_json.dump() + .c_str()); + + ten_env.send_cmd( + std::move(start_graph_cmd), + [this](ten::ten_env_t &ten_env, std::unique_ptr cmd, + ten::error_t *err) { + // result for the 'start_graph' command + auto status_code = cmd->get_status_code(); + EXPECT_EQ(status_code, TEN_STATUS_CODE_ERROR); + + auto graph_id = cmd->get_property_string("detail"); + EXPECT_EQ(graph_id, ""); + + start_graph_cmd_is_done = true; + + if (test_cmd != nullptr) { + nlohmann::json detail = {{"id", 1}, {"name", "a"}}; + + auto cmd_result = ten::cmd_result_t::create(TEN_STATUS_CODE_OK); + cmd_result->set_property_from_json("detail", detail.dump().c_str()); + ten_env.return_result(std::move(cmd_result), std::move(test_cmd)); + } + }); + + ten_env.on_start_done(); + } + + void on_cmd(ten::ten_env_t &ten_env, + std::unique_ptr cmd) override { + if (cmd->get_name() == "test") { + if (start_graph_cmd_is_done) { + nlohmann::json detail = {{"id", 1}, {"name", "a"}}; + + auto cmd_result = ten::cmd_result_t::create(TEN_STATUS_CODE_OK); + cmd_result->set_property_from_json("detail", detail.dump().c_str()); + ten_env.return_result(std::move(cmd_result), std::move(cmd)); + } else { + test_cmd = std::move(cmd); + return; + } + } else { + TEN_ASSERT(0, "Should not happen."); + } + } + + private: + bool start_graph_cmd_is_done{}; + std::unique_ptr test_cmd; +}; + +class test_app : public ten::app_t { + public: + void on_configure(ten::ten_env_t &ten_env) override { + bool rc = ten::ten_env_internal_accessor_t::init_manifest_from_json( + ten_env, + // clang-format off + R"({ + "type": "app", + "name": "test_app", + "version": "0.1.0" + })" + // clang-format on + ); + ASSERT_EQ(rc, true); + + rc = ten_env.init_property_from_json( + // clang-format off + R"({ + "_ten": { + "uri": "msgpack://127.0.0.1:8001/", + "log_level": 2, + "predefined_graphs": [{ + "name": "default", + "auto_start": false, + "singleton": true, + "nodes": [{ + "type": "extension", + "name": "predefined_graph", + "addon": "start_incorrect_graph_2__predefined_graph_extension", + "extension_group": "start_incorrect_graph_2__predefined_graph_group" + }] + }] + } + })" + // clang-format on + ); + ASSERT_EQ(rc, true); + + ten_env.on_configure_done(); + } +}; + +void *app_thread_main(TEN_UNUSED void *args) { + auto *app = new test_app(); + app->run(); + delete app; + + return nullptr; +} + +TEN_CPP_REGISTER_ADDON_AS_EXTENSION( + start_incorrect_graph_2__predefined_graph_extension, test_predefined_graph); +TEN_CPP_REGISTER_ADDON_AS_EXTENSION(start_incorrect_graph_2__normal_extension, + test_normal_extension); + +} // namespace + +TEST(StartGraphTest, StartIncorrectGraph2) { // NOLINT + auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); + + // Create a client and connect to the app. + auto *client = new ten::msgpack_tcp_client_t("msgpack://127.0.0.1:8001/"); + + // Do not need to send 'start_graph' command first. + // The 'graph_id' MUST be "default" (a special string) if we want to send the + // request to predefined graph. + auto test_cmd = ten::cmd_t::create("test"); + test_cmd->set_dest("msgpack://127.0.0.1:8001/", "default", + "start_incorrect_graph_2__predefined_graph_group", + "predefined_graph"); + auto cmd_result = client->send_cmd_and_recv_result(std::move(test_cmd)); + ten_test::check_status_code(cmd_result, TEN_STATUS_CODE_OK); + ten_test::check_detail_with_json(cmd_result, R"({"id": 1, "name": "a"})"); + + delete client; + + ten_thread_join(app_thread, -1); +} diff --git a/tests/ten_runtime/smoke/start_graph/start_predefined_graph_cross_app.cc b/tests/ten_runtime/smoke/start_graph/start_predefined_graph_cross_app.cc index d7f4c9487..f155eddd9 100644 --- a/tests/ten_runtime/smoke/start_graph/start_predefined_graph_cross_app.cc +++ b/tests/ten_runtime/smoke/start_graph/start_predefined_graph_cross_app.cc @@ -236,7 +236,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, StartPredefinedGraphCrossApp) { // NOLINT +TEST(StartGraphTest, StartPredefinedGraphCrossApp) { // NOLINT auto *app_1_thread = ten_thread_create("app thread 1", app_thread_1_main, nullptr); auto *app_2_thread = diff --git a/tests/ten_runtime/smoke/start_graph/start_predefined_graph_from_extension.cc b/tests/ten_runtime/smoke/start_graph/start_predefined_graph_from_extension.cc index 9e5ffa573..98ae1b2dd 100644 --- a/tests/ten_runtime/smoke/start_graph/start_predefined_graph_from_extension.cc +++ b/tests/ten_runtime/smoke/start_graph/start_predefined_graph_from_extension.cc @@ -177,7 +177,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, StartPredefinedGraphFromExtension) { // NOLINT +TEST(StartGraphTest, StartPredefinedGraphFromExtension) { // NOLINT auto *app_thread = ten_thread_create("app thread", app_thread_main, nullptr); // Create a client and connect to the app. diff --git a/tests/ten_runtime/smoke/start_graph/start_two_predefined_graphs.cc b/tests/ten_runtime/smoke/start_graph/start_two_predefined_graphs.cc index 0f407573d..fdcd182a4 100644 --- a/tests/ten_runtime/smoke/start_graph/start_two_predefined_graphs.cc +++ b/tests/ten_runtime/smoke/start_graph/start_two_predefined_graphs.cc @@ -282,7 +282,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION( } // namespace -TEST(ExtensionTest, StartTwoPredefinedGraphs) { // NOLINT +TEST(StartGraphTest, StartTwoPredefinedGraphs) { // NOLINT auto *app_1_thread = ten_thread_create("app thread 1", app_thread_1_main, nullptr); auto *app_2_thread =