Phase 3 complete
This commit is contained in:
parent
a090ae75da
commit
8059148808
@ -97,6 +97,7 @@ add_executable (
|
||||
transport_policy_options.cpp
|
||||
url_test.cpp
|
||||
uuid_test.cpp
|
||||
websocket_test.cpp
|
||||
)
|
||||
|
||||
target_compile_definitions(azure-core-test PRIVATE _azure_BUILDING_TESTS)
|
||||
@ -134,7 +135,9 @@ endif()
|
||||
|
||||
# Additional test files to be copied to the output directory.
|
||||
set(TEST_ADDITIONAL_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/requirements.txt
|
||||
${CMAKE_CURRENT_LIST_DIR}/requirements.txt
|
||||
${CMAKE_CURRENT_LIST_DIR}/websocket_server.py
|
||||
${CMAKE_CURRENT_LIST_DIR}/Start-WebSocketServer.ps1
|
||||
)
|
||||
|
||||
add_custom_command(TARGET azure-core-test POST_BUILD
|
||||
|
||||
@ -264,8 +264,8 @@ TEST(Nullable, ConstexprAndRvalue)
|
||||
#pragma clang diagnostic ignored "-Wpessimizing-move" // cspell:disable-line
|
||||
#endif // __clang__
|
||||
|
||||
Nullable<int> nullableInt0(std::move(Nullable<int>()));
|
||||
Nullable<int> nullableInt11(std::move(Nullable<int>(11)));
|
||||
Nullable<int> nullableInt0{Nullable<int>{}};
|
||||
Nullable<int> nullableInt11{Nullable<int>{11}};
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop // NOLINT(clang-diagnostic-unknown-pragmas)
|
||||
|
||||
@ -60,7 +60,7 @@ TEST_F(WebSocketTests, OpenSimpleSocket)
|
||||
|
||||
// When running this test locally, the call times out, so drop in a 5 second timeout on
|
||||
// the request.
|
||||
Azure::Core::Context requestContext = Azure::Core::Context::ApplicationContext.WithDeadline(
|
||||
Azure::Core::Context requestContext = Azure::Core::Context{}.WithDeadline(
|
||||
std::chrono::system_clock::now() + 5s);
|
||||
EXPECT_THROW(defaultSocket.Open(requestContext), std::runtime_error);
|
||||
}
|
||||
@ -327,7 +327,7 @@ TEST_F(WebSocketTests, PingReceiveTest)
|
||||
{
|
||||
|
||||
GTEST_LOG_(INFO) << "Sleeping for 15 seconds to collect pings.";
|
||||
Azure::Core::Context receiveContext = Azure::Core::Context::ApplicationContext.WithDeadline(
|
||||
Azure::Core::Context receiveContext = Azure::Core::Context{}.WithDeadline(
|
||||
Azure::DateTime{std::chrono::system_clock::now() + 15s});
|
||||
EXPECT_THROW(testSocket.ReceiveFrame(receiveContext), Azure::Core::OperationCancelledException);
|
||||
auto statistics = testSocket.GetStatistics();
|
||||
@ -361,7 +361,7 @@ TEST_F(WebSocketTests, PingSendTest)
|
||||
GTEST_LOG_(INFO) << "Sleeping for 10 seconds to collect pings.";
|
||||
// Note that we cannot collect incoming pings or outgoing pongs unless we are receiving
|
||||
// data from the server.
|
||||
Azure::Core::Context receiveContext = Azure::Core::Context::ApplicationContext.WithDeadline(
|
||||
Azure::Core::Context receiveContext = Azure::Core::Context{}.WithDeadline(
|
||||
Azure::DateTime{std::chrono::system_clock::now() + 10s});
|
||||
EXPECT_THROW(testSocket.ReceiveFrame(receiveContext), Azure::Core::OperationCancelledException);
|
||||
auto statistics = testSocket.GetStatistics();
|
||||
@ -409,7 +409,7 @@ TEST_F(WebSocketTests, MultiThreadedTestOnSingleSocket)
|
||||
std::chrono::time_point<std::chrono::system_clock> startTime
|
||||
= std::chrono::system_clock::now();
|
||||
// Set the context to expire *after* the test is supposed to finish.
|
||||
Azure::Core::Context context = Azure::Core::Context::ApplicationContext.WithDeadline(
|
||||
Azure::Core::Context context = Azure::Core::Context{}.WithDeadline(
|
||||
Azure::DateTime{startTime} + testDuration + 10s);
|
||||
size_t iteration = 0;
|
||||
try
|
||||
@ -571,7 +571,7 @@ TEST_F(WebSocketTests, MultiThreadedTestOnMultipleSockets)
|
||||
std::chrono::time_point<std::chrono::system_clock> startTime
|
||||
= std::chrono::system_clock::now();
|
||||
// Set the context to expire *after* the test is supposed to finish.
|
||||
Azure::Core::Context context = Azure::Core::Context::ApplicationContext.WithDeadline(
|
||||
Azure::Core::Context context = Azure::Core::Context{}.WithDeadline(
|
||||
Azure::DateTime{startTime} + testDuration + 10s);
|
||||
size_t iteration = 0;
|
||||
try
|
||||
|
||||
Loading…
Reference in New Issue
Block a user