From c41041a3b6063c4d9c7421208da83ccda682539d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 16 Jan 2021 21:20:10 +0100 Subject: [PATCH] Show error description if available when Cancel() test fails Hopefully this might provide more information about the failure of this test in MSVS 2008 build on AppVeyor. --- tests/net/webrequest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/net/webrequest.cpp b/tests/net/webrequest.cpp index 14ce33f1da..64cf7afcab 100644 --- a/tests/net/webrequest.cpp +++ b/tests/net/webrequest.cpp @@ -87,6 +87,7 @@ public: case wxWebRequest::State_Unauthorized: case wxWebRequest::State_Failed: case wxWebRequest::State_Cancelled: + errorDescription = evt.GetErrorDescription(); loop.Exit(); break; } @@ -134,6 +135,7 @@ public: wxWebRequest request; wxInt64 expectedFileSize; wxInt64 dataSize; + wxString errorDescription; }; TEST_CASE_METHOD(RequestFixture, @@ -350,6 +352,8 @@ TEST_CASE_METHOD(RequestFixture, request.Start(); request.Cancel(); RunLoopWithTimeout(); + if ( !errorDescription.empty() ) + INFO( "Error:" << errorDescription ); REQUIRE( request.GetState() == wxWebRequest::State_Cancelled ); }