core icon indicating copy to clipboard operation
core copied to clipboard

Fix TestHtmlToPDF occasional issue

Open dstpierre opened this issue 3 years ago • 0 comments

Describe the bug GitHub actions sometimes failed due to this test sometimes raising an error. I've seen it happened once in development as well.

error line:128: context deadline exceeded

Lines in question:

if resp.StatusCode > 299 {
  b, err := io.ReadAll(resp.Body)
  if err != nil {
    t.Fatal(err)
  }
  t.Log(string(b))
  t.Errorf("expected status 200 got %s", resp.Status)
}

To Reproduce

  1. First remove the t.Skip in this test in extras_test.go line: 116
  2. Running this test multiple times in a row should trigger the issue:
$ make thistest TestHtmlToPDF

Expected behavior This should always work and not trigger this error

Output of staticbackend -v This flag isn't implement yet.

dstpierre avatar Aug 09 '22 10:08 dstpierre