From efe6a2047eb2c6bb25cced3b07f8ea4ebef516ba Mon Sep 17 00:00:00 2001 From: Sebastiaan Klippert Date: Sun, 23 Jun 2024 21:02:47 +0200 Subject: [PATCH] Skip TestContextCancellation on Windows GitHub runner --- .github/workflows/windows.yml | 2 +- wkhtmltopdf_test.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0681896..83b2409 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,4 +1,4 @@ -name: Windows tests only +name: Windows manual tests on: workflow_dispatch diff --git a/wkhtmltopdf_test.go b/wkhtmltopdf_test.go index df1f981..3a9e1be 100644 --- a/wkhtmltopdf_test.go +++ b/wkhtmltopdf_test.go @@ -8,6 +8,7 @@ import ( "os/exec" "path/filepath" "reflect" + "runtime" "strings" "testing" "time" @@ -127,7 +128,10 @@ func TestGeneratePDF(t *testing.T) { } func TestContextCancellation(t *testing.T) { - t.SkipNow() + if os.Getenv("GITHUB_ACTIONS") == "true" && runtime.GOOS == "windows" { + t.Skip("temporarily skipping on Windows Github actions, because it blocks. Most likely on due to WindowStatus being set, need to investigate") + } + pdfg := newTestPDFGenerator(t) htmlfile, err := os.ReadFile("testdata/htmlsimple.html") if err != nil {