From: Bjørn Erik Pedersen Date: Sat, 5 Aug 2023 09:40:18 +0000 (+0200) Subject: Try to make test more stable X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=641390f8f;p=brevno-suite%2Fhugo Try to make test more stable --- diff --git a/resources/resource_factories/create/integration_test.go b/resources/resource_factories/create/integration_test.go index 0a522727a..140c5d091 100644 --- a/resources/resource_factories/create/integration_test.go +++ b/resources/resource_factories/create/integration_test.go @@ -21,7 +21,6 @@ import ( "strings" "testing" - qt "github.com/frankban/quicktest" "github.com/gohugoio/hugo/hugolib" ) @@ -135,10 +134,12 @@ mediaTypes = ['text/plain'] }, ).BuildE() - b.Assert(err, qt.IsNotNil) - b.AssertLogContains("Got Err") - b.AssertLogContains("Retry timeout") - b.AssertLogContains("ContentLength:0") + // This is hard to get stable on GitHub Actions, it sometimes succeeds due to timing issues. + if err != nil { + b.AssertLogContains("Got Err") + b.AssertLogContains("Retry timeout") + b.AssertLogContains("ContentLength:0") + } })