Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestServerPathEncodingIssues/{Unicode_paths,Windows_multilingual_404} often fail (seen on Debian buildd) #10332

Closed
anthonyfok opened this issue Sep 27, 2022 · 4 comments · Fixed by #10356
Assignees
Milestone

Comments

@anthonyfok
Copy link
Member

anthonyfok commented Sep 27, 2022

It looks like TestServerPathEncodingIssues/Windows_multilingual_404 in v0.104.0 is another "flaky" test (see 08f0984) , failing on the first try on armel and s390x architectures on Debian buildd machines:

=== RUN   TestServerPathEncodingIssues/Windows_multilingual_404
    server_test.go:343: 
        error:
          got non-nil error
        got:
          e`Get "http://localhost:41561/en/this/does/not/exist": dial tcp [::1]:41561: connect: connection refused`
        stack:
          /<<PKGBUILDDIR>>/_build/src/github.com/gohugoio/hugo/commands/server_test.go:343
            c.Assert(err, qt.IsNil)
          /<<PKGBUILDDIR>>/_build/src/github.com/gohugoio/hugo/commands/server_test.go:353
            func() {
                resp, err := http.Get(fmt.Sprintf("http://localhost:%d/%s", port, path))
                c.Assert(err, qt.IsNil)
                pr := pathResult{
                    statusCode: resp.StatusCode,
                }
            
                if err == nil {
                    defer resp.Body.Close()
                    pr.body = helpers.ReaderToString(resp.Body)
                }
                result.pathsResults[path] = pr
            }()
          /<<PKGBUILDDIR>>/_build/src/github.com/gohugoio/hugo/commands/server_test.go:124
            r := runServerTest(c,
                serverTestOptions{
                    config:     config,
                    pathsToGet: []string{"en/this/does/not/exist", "es/this/does/not/exist"},
                },
            )
        
--- FAIL: TestServerPathEncodingIssues (1.07s)
    --- PASS: TestServerPathEncodingIssues/Unicode_paths (1.06s)
    --- FAIL: TestServerPathEncodingIssues/Windows_multilingual_404 (0.01s)

I tried rebuilding (or "giveback" in Debian-speak), but surprisingly to me, the test failed consistently on armel and s390x (and ppc64)

Don't know why yet; I'll try again on Debian porterbox machines for armel and s390x and see if I could reproduce the error.

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.104.0+extended linux/s390x BuildDate=2022-09-25T07:58:54Z VendorInfo=debian:0.104.0-1

Does this issue reproduce with the latest release?

Yes Not sure, only tested with v0.104.0; will test with v0.104.1 soon.

@bep
Copy link
Member

bep commented Sep 28, 2022

Yea, that test has been flaky on GitHub CI as well so I don't mind it if we somehow only run it locally and on GitHub ... or something,

@anthonyfok anthonyfok changed the title TestServerPathEncodingIssues/Windows_multilingual_404 fails on Debian buildd armel and s390x TestServerPathEncodingIssues/{Unicode_paths,Windows_multilingual_404} often fail (seen on Debian buildd) Oct 3, 2022
@anthonyfok
Copy link
Member Author

Updating this issue to reflect that it is not platform specific at all; the tests TestServerPathEncodingIssues/Unicode_paths and TestServerPathEncodingIssues/Windows_multilingual_404 could fail on any platforms:

image

e.g. for 0.104.2-1, amd64 needed 1 rebuild, and armel needed 6 rebuilds:

image
image

@anthonyfok
Copy link
Member Author

Yea, that test has been flaky on GitHub CI as well so I don't mind it if we somehow only run it locally and on GitHub ... or something,

The test has been flaky on my (somewhat old) local laptop too. After some debugging, it seems that no 567 milliseconds or (for CI) 2 seconds wait is added because getNumHomes is not set for these two tests? I'll make a PR and also test the patch on Debian buildd/CI infrastructure soon.

anthonyfok added a commit to anthonyfok/hugo that referenced this issue Oct 4, 2022
Set getNumHomes: 1 to enable 567 ms or 2 s of wait for the server
to be ready in TestServerPathEncodingIssues/Unicode_paths and
TestServerPathEncodingIssues/Windows_multilingual_404.

Fixes gohugoio#10332
anthonyfok added a commit to anthonyfok/hugo that referenced this issue Oct 4, 2022
Set getNumHomes: 1 to enable 567 ms or 2 s of wait for the server
to be ready in TestServerPathEncodingIssues/Unicode_paths and
TestServerPathEncodingIssues/Windows_multilingual_404.

Fixes gohugoio#10332
@bep bep closed this as completed in #10356 Oct 4, 2022
bep pushed a commit that referenced this issue Oct 4, 2022
Set getNumHomes: 1 to enable 567 ms or 2 s of wait for the server
to be ready in TestServerPathEncodingIssues/Unicode_paths and
TestServerPathEncodingIssues/Windows_multilingual_404.

Fixes #10332
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@bep @anthonyfok and others