facebookarchive / contest

Run continuous and on-demand system testing for real and virtual hardware
MIT License
32 stars 15 forks source link

Fix test step shutdown timeout handling #259

Closed rojer9-fb closed 3 years ago

rojer9-fb commented 3 years ago

Never close test's output channel while runner goroutine is still up to prevent "write on closed channel" panics.

If step runner fails to exit within shutdown timeout after aving processed all the targets, assert cancellation to release the reader.

Signed-off-by: Deomid "rojer" Ryabkov rojer9@fb.com

codecov[bot] commented 3 years ago

Codecov Report

Merging #259 (95be587) into master (56d561e) will increase coverage by 0.15%. The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #259      +/-   ##
==========================================
+ Coverage   64.69%   64.85%   +0.15%     
==========================================
  Files         121      121              
  Lines        5393     5420      +27     
==========================================
+ Hits         3489     3515      +26     
- Misses       1507     1508       +1     
  Partials      397      397              
Flag Coverage Δ
integration 59.01% <68.75%> (+0.18%) :arrow_up:
integration_storage ∅ <ø> (∅)
unittests 45.14% <87.50%> (+0.15%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/runner/test_runner.go 92.72% <87.50%> (+1.49%) :arrow_up:
pkg/cerrors/cerrors.go 0.00% <0.00%> (-14.29%) :arrow_down:
pkg/jobmanager/status.go 63.63% <0.00%> (-0.57%) :arrow_down:
pkg/runner/job_runner.go 62.50% <0.00%> (+1.44%) :arrow_up:

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 56d561e...95be587. Read the comment docs.