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

lib: better error message for timeout error #1173

Merged
merged 3 commits into from
Sep 24, 2019
Merged

lib: better error message for timeout error #1173

merged 3 commits into from
Sep 24, 2019

Conversation

cuonglm
Copy link
Contributor

@cuonglm cuonglm commented Sep 24, 2019

TimeoutError is currently very uninformative, even if there are
duplicated error messages.

This PR change TimeoutError to a struct, which contains both the place
and the timeout duration, so it helps constructing error message with
more useful information to user.

While at it, also prevent duplicating timeout error message for setup
and teardown.

Close #702

@codecov-io
Copy link

codecov-io commented Sep 24, 2019

Codecov Report

Merging #1173 into master will decrease coverage by 0.01%.
The diff coverage is 43.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1173      +/-   ##
==========================================
- Coverage   73.59%   73.58%   -0.02%     
==========================================
  Files         144      144              
  Lines       10529    10547      +18     
==========================================
+ Hits         7749     7761      +12     
- Misses       2322     2328       +6     
  Partials      458      458
Impacted Files Coverage Δ
cmd/run.go 9.5% <0%> (ø) ⬆️
js/runner.go 82.1% <14.28%> (-2.64%) ⬇️
lib/timeout_error.go 75% <84.61%> (+75%) ⬆️

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 7963475...e8a271c. Read the comment docs.

lib/timeout_error.go Outdated Show resolved Hide resolved
cmd/run.go Outdated Show resolved Hide resolved
TimeoutError is currently very uninformative, even if there are
duplicated error messages.

This PR change TimeoutError to a struct, which contains both the place
and the timeout duration, so it helps constructing error message with
more useful information to user.

While at it, also prevent duplicating timeout error message for setup
and teardown.

Close #702
Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cuonglm cuonglm merged commit 4526005 into master Sep 24, 2019
@cuonglm cuonglm deleted the feature/702 branch September 24, 2019 12:56
@na-- na-- added this to the v0.26.0 milestone Sep 24, 2019
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.

Better error messages for setup and teardown timeouts
5 participants