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

TestExecContextCancel: Reduce timeout to make less flaky #879

Merged
merged 1 commit into from Nov 16, 2020

Conversation

evanj
Copy link
Contributor

@evanj evanj commented Nov 15, 2020

This test fails fairly often. On my system, I can trigger it with:

go test . -run=TestExecContextCancel -count=10 -failfast -v

This makes the test less flaky by timing out the context after a
consistent 50 millisecond delay. This was enough time for the query
to start, then get cancelled with sqlite3_interrupt() in my tests.
This now passes the above check.

This is a modified version of the change suggested in:
#865

This test fails fairly often. On my system, I can trigger it with:

    go test . -run=TestExecContextCancel -count=10 -failfast -v

This makes the test less flaky by timing out the context after a
consistent 50 millisecond delay. This was enough time for the query
to start, then get cancelled with sqlite3_interrupt() in my tests.
This now passes the above check.

This is a modified version of the change suggested in:
mattn#865
@codecov-io
Copy link

codecov-io commented Nov 15, 2020

Codecov Report

Merging #879 (0d9f18b) into master (92f580b) will decrease coverage by 0.59%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #879      +/-   ##
==========================================
- Coverage   47.26%   46.66%   -0.60%     
==========================================
  Files          12       11       -1     
  Lines        1917     1440     -477     
==========================================
- Hits          906      672     -234     
+ Misses        876      635     -241     
+ Partials      135      133       -2     
Impacted Files Coverage Δ
sqlite3_load_extension.go 59.37% <0.00%> (-3.67%) ⬇️
backup.go 83.33% <0.00%> (-1.29%) ⬇️
callback.go 58.16% <0.00%> (-0.81%) ⬇️
error.go 81.81% <0.00%> (-0.54%) ⬇️
convert.go 0.00% <0.00%> (ø)
sqlite3_go18.go 88.23% <0.00%> (ø)
sqlite3_type.go 0.00% <0.00%> (ø)
sqlite3_context.go 0.00% <0.00%> (ø)
sqlite3_func_crypt.go 100.00% <0.00%> (ø)
sqlite3_opt_userauth_omit.go 10.00% <0.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92f580b...0d9f18b. Read the comment docs.

@mattn
Copy link
Owner

mattn commented Nov 16, 2020

Thank you this too!

@mattn mattn merged commit 3fb3c0d into mattn:master Nov 16, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants