diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt index b2ead6cd0e..c53694845d 100644 --- a/sdk/core/azure-core/CMakeLists.txt +++ b/sdk/core/azure-core/CMakeLists.txt @@ -204,7 +204,10 @@ if(BUILD_TESTING) add_subdirectory(test/nlohmann-json-test) endif() add_subdirectory(test/fault-injector) - add_subdirectory(test/libcurl-stress-test) + + if(BUILD_TRANSPORT_CURL) + add_subdirectory(test/libcurl-stress-test) + endif() endif() if (BUILD_PERFORMANCE_TESTS) diff --git a/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp b/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp index d3d429b68d..c47b9d736d 100644 --- a/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp +++ b/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp @@ -27,16 +27,12 @@ void SendRequest(std::string target) { std::cout << target << std::endl; /* The transport adapter must allow insecure SSL certs. - If both curl and winHttp are available, curl is preferred for this test.for*/ -#if defined(BUILD_CURL_HTTP_TRANSPORT_ADAPTER) + If both curl and winHttp are available, curl is preferred for this test*/ + Azure::Core::Http::CurlTransportOptions curlOptions; curlOptions.SslVerifyPeer = false; auto implementationClient = std::make_shared(curlOptions); -#elif (BUILD_TRANSPORT_WINHTTP_ADAPTER) - Azure::Core::Http::WinHttpTransportOptions winHttpOptions; - auto implementationClient = std::make_shared(winHttpOptions); -#endif try {