fabric8-services / fabric8-wit

wit stands for Work Item Tracker
http://devdoc.almighty.io/
Apache License 2.0
45 stars 86 forks source link

capture range variable for parallel testing #2346

Closed kwk closed 5 years ago

kwk commented 5 years ago

Before only the last range variable was being used and some tests just passed when the shouldn't have.

See also https://gist.github.com/posener/92a55c4cd441fc5e5e85f27bca008721.

And https://golang.org/pkg/testing/#hdr-Subtests_and_Sub_benchmarks for capturing range variables.

Thanks to @michaelkleinhenz for finding this and @jarifibrahim for finding the solution which is well known but in this case it is just too easy to miss.

codecov[bot] commented 5 years ago

Codecov Report

Merging #2346 into master will increase coverage by 0.07%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2346      +/-   ##
==========================================
+ Coverage   70.17%   70.24%   +0.07%     
==========================================
  Files         171      171              
  Lines       16625    16625              
==========================================
+ Hits        11666    11678      +12     
+ Misses       3829     3821       -8     
+ Partials     1130     1126       -4
Impacted Files Coverage Δ
workitem/simple_type.go 84.21% <0%> (+1.31%) :arrow_up:
workitem/enum_type.go 93.75% <0%> (+7.5%) :arrow_up:
workitem/link/topology.go 100% <0%> (+21.05%) :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 829eb51...ad8cd52. Read the comment docs.