Skip to content

Fix context pollution in IterationNode.around()#1446

Merged
leonard84 merged 1 commit intospockframework:masterfrom
leonard84:fix-1441-context-leak
Mar 14, 2022
Merged

Fix context pollution in IterationNode.around()#1446
leonard84 merged 1 commit intospockframework:masterfrom
leonard84:fix-1441-context-leak

Conversation

@leonard84
Copy link
Copy Markdown
Member

Prior to this commit, any exception thrown in IterationNode.around(), i.e. in an iteration interceptor,
would pollute the feature context, affecting the outcome of subsequent iterations and the feature itself.

fixes #1441

@leonard84 leonard84 added this to the 2.2 milestone Mar 13, 2022
@leonard84 leonard84 self-assigned this Mar 13, 2022
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2022

Codecov Report

Merging #1446 (3ef018d) into master (e9d5ece) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 3ef018d differs from pull request most recent head 4dd436c. Consider uploading reports for the commit 4dd436c to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1446      +/-   ##
============================================
+ Coverage     79.52%   79.53%   +0.01%     
- Complexity     4006     4007       +1     
============================================
  Files           404      404              
  Lines         12547    12550       +3     
  Branches       1641     1641              
============================================
+ Hits           9978     9982       +4     
+ Misses         1974     1973       -1     
  Partials        595      595              
Impacted Files Coverage Δ
...java/org/spockframework/runtime/IterationNode.java 100.00% <100.00%> (ø)
...ain/java/org/spockframework/runtime/SpockNode.java 78.72% <0.00%> (+2.12%) ⬆️

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 e9d5ece...4dd436c. Read the comment docs.

Prior to this commit, any exception thrown in IterationNode.around(), i.e. in an iteration interceptor,
would pollute the feature context, affecting the outcome of subsequent iterations and the feature itself.

fixes spockframework#1441
@leonard84 leonard84 force-pushed the fix-1441-context-leak branch from 3ef018d to 4dd436c Compare March 14, 2022 19:30
@leonard84 leonard84 enabled auto-merge (squash) March 14, 2022 19:39
@leonard84 leonard84 disabled auto-merge March 14, 2022 19:39
@leonard84 leonard84 merged commit 3dac230 into spockframework:master Mar 14, 2022
@leonard84 leonard84 deleted the fix-1441-context-leak branch March 14, 2022 19:39
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.

Previous IterationInfo bleeds over into subsequent iterations after throwing exception in interceptor

1 participant