From 4dbf1e30771c7f82d451f14d3391f29fd020aae6 Mon Sep 17 00:00:00 2001 From: hhenry01 Date: Sat, 23 Mar 2024 11:27:16 -0700 Subject: [PATCH 1/2] This might work --- .../projects/remote_transceiver/inc/remote_transceiver.h | 4 +++- .../remote_transceiver/test/test_remote_transceiver.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/network_systems/projects/remote_transceiver/inc/remote_transceiver.h b/src/network_systems/projects/remote_transceiver/inc/remote_transceiver.h index da0e05033..b1d4398e1 100644 --- a/src/network_systems/projects/remote_transceiver/inc/remote_transceiver.h +++ b/src/network_systems/projects/remote_transceiver/inc/remote_transceiver.h @@ -16,7 +16,9 @@ using tcp = boost::asio::ip::tcp; namespace remote_transceiver { -constexpr int DEFAULT_NUM_IO_THREADS = 2; // Default number of HTTP requests that can be accepted in parallel +// Default number of HTTP requests that can be accepted in parallel +// Using more than one thread is potentially buggy +constexpr int DEFAULT_NUM_IO_THREADS = 1; // Production constants are all placheholders static const std::string PROD_DB_NAME = "PLACEHOLDER"; diff --git a/src/network_systems/projects/remote_transceiver/test/test_remote_transceiver.cpp b/src/network_systems/projects/remote_transceiver/test/test_remote_transceiver.cpp index 8b043bf39..62cbecd35 100644 --- a/src/network_systems/projects/remote_transceiver/test/test_remote_transceiver.cpp +++ b/src/network_systems/projects/remote_transceiver/test/test_remote_transceiver.cpp @@ -35,7 +35,7 @@ static UtilDB g_test_db(test_db_name, MONGODB_CONN_STR, std::make_sh class TestRemoteTransceiver : public ::testing::Test { protected: - static constexpr int NUM_THREADS = 4; + static constexpr int NUM_THREADS = 1; // Need to wait after receiving an HTTP response from the server static constexpr auto WAIT_AFTER_RES = std::chrono::milliseconds(20); From 04c12c514ae72fcb0fbcfdd0aebd3f0c9057b4bc Mon Sep 17 00:00:00 2001 From: hhenry01 Date: Sat, 23 Mar 2024 14:07:47 -0700 Subject: [PATCH 2/2] Increase timeout --- .../projects/remote_transceiver/inc/remote_transceiver.h | 3 +-- .../remote_transceiver/test/test_remote_transceiver.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/network_systems/projects/remote_transceiver/inc/remote_transceiver.h b/src/network_systems/projects/remote_transceiver/inc/remote_transceiver.h index b1d4398e1..ca00bf474 100644 --- a/src/network_systems/projects/remote_transceiver/inc/remote_transceiver.h +++ b/src/network_systems/projects/remote_transceiver/inc/remote_transceiver.h @@ -17,8 +17,7 @@ using tcp = boost::asio::ip::tcp; namespace remote_transceiver { // Default number of HTTP requests that can be accepted in parallel -// Using more than one thread is potentially buggy -constexpr int DEFAULT_NUM_IO_THREADS = 1; +constexpr int DEFAULT_NUM_IO_THREADS = 2; // Production constants are all placheholders static const std::string PROD_DB_NAME = "PLACEHOLDER"; diff --git a/src/network_systems/projects/remote_transceiver/test/test_remote_transceiver.cpp b/src/network_systems/projects/remote_transceiver/test/test_remote_transceiver.cpp index 62cbecd35..415a155bb 100644 --- a/src/network_systems/projects/remote_transceiver/test/test_remote_transceiver.cpp +++ b/src/network_systems/projects/remote_transceiver/test/test_remote_transceiver.cpp @@ -35,9 +35,9 @@ static UtilDB g_test_db(test_db_name, MONGODB_CONN_STR, std::make_sh class TestRemoteTransceiver : public ::testing::Test { protected: - static constexpr int NUM_THREADS = 1; + static constexpr int NUM_THREADS = 4; // Need to wait after receiving an HTTP response from the server - static constexpr auto WAIT_AFTER_RES = std::chrono::milliseconds(20); + static constexpr auto WAIT_AFTER_RES = std::chrono::milliseconds(200); // Network objects that are shared amongst all HTTP test suites static bio::io_context io_;