Skip URL test if it fails when running on AppVeyor
Failing it is not useful, this results in the CI failure when in 99% of the cases the transient network problem which resulted in this test failure has nothing to do with the changes being tested.
This commit is contained in:
@@ -75,11 +75,11 @@ void URLTestCase::GetInputStream()
|
|||||||
wxScopedPtr<wxInputStream> in_stream(url.GetInputStream());
|
wxScopedPtr<wxInputStream> in_stream(url.GetInputStream());
|
||||||
if ( !in_stream && IsAutomaticTest() )
|
if ( !in_stream && IsAutomaticTest() )
|
||||||
{
|
{
|
||||||
// Sometimes the connection fails during CI runs, try to connect once
|
// Sometimes the connection fails during CI runs, don't consider this
|
||||||
// again if this happens in the hope it was just a transient error.
|
// as a fatal error because it happens from time to time and there is
|
||||||
wxSleep(3);
|
// nothing we can do about it.
|
||||||
WARN("Connection to www.wxwidgets.org failed, retrying...");
|
WARN("Connection to www.wxwidgets.org failed, skipping the test.");
|
||||||
in_stream.reset(url.GetInputStream());
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPPUNIT_ASSERT(in_stream);
|
CPPUNIT_ASSERT(in_stream);
|
||||||
|
Reference in New Issue
Block a user