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

TestServerRequestTimeout is flaky on Windows #131

Open
austinvazquez opened this issue Feb 25, 2023 · 2 comments
Open

TestServerRequestTimeout is flaky on Windows #131

austinvazquez opened this issue Feb 25, 2023 · 2 comments

Comments

@austinvazquez
Copy link
Contributor

TestServerRequestTimeout has been intermittently failing in PRs due to differences in deadline comparisons.

Example output from a PR run

🇩 coverage
--- FAIL: TestServerRequestTimeout (0.01s)
    server_test.go:406: expected deadline 2023-02-25 00:20:34.5471163 +0000 GMT m=+601.181318201, actual: 1677284434547116900
FAIL
coverage: 64.8% of statements
FAIL	github.com/containerd/ttrpc	1.385s
FAIL
mingw32-make: *** [makefile:155: coverage] Error 1
Error: Process completed with exit code 1.
@austinvazquez
Copy link
Contributor Author

austinvazquez commented Mar 8, 2023

After adding troubleshooting code, the error is the following from https://github.com/containerd/ttrpc/actions/runs/4368862651/jobs/7641979795

🇩 coverage
?   	github.com/containerd/ttrpc/internal	[no test files]
--- FAIL: TestServerRequestTimeout (0.02s)
    server_test.go:403: expected deadline 2023-03-08 22:07:26.763647 +0000 UTC m=+601.464964001, actual: 2023-03-08 22:07:26.7636471 +0000 UTC
FAIL
FAIL	github.com/containerd/ttrpc	1.723s
?   	github.com/containerd/ttrpc/plugin	[no test files]
FAIL
mingw32-make: *** [makefile:154: coverage] Error 1
Error: Process completed with exit code 1.

@austinvazquez
Copy link
Contributor Author

austinvazquez commented Mar 9, 2023

After putting the expected and actual values in same format, it looks like the issue is off by 1 nanosecond. My read of Golang's context.Context interface is that successful calls to Deadline would result in consistent results. Is this possibly a Go bug on Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant