core
core copied to clipboard
Fix TestHtmlToPDF occasional issue
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
- First remove the
t.Skipin this test inextras_test.goline: 116 - 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.