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

SpringFailOnTimeout loses original exception when triggering timeout in finally block [SPR-16716] #21257

Closed
spring-projects-issues opened this issue Apr 11, 2018 · 3 comments
Assignees
Labels
in: test Issues in the test module status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Igor opened SPR-16716 and commented

Invalid exception throw in "finally" block. Need to save "causeof" exception from "try" block


Affects: 4.3.16, 5.0.5

Referenced from: pull request #1784, and commits fecbcd4, 4f3a7dd, 02e0909

Backported to: 4.3.17

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

As noted on GitHub, a solution might be to move the timeout check outside of a finally block to begin with, simply only executing it when the evaluate() call succeeded... letting the original exception be propagated as-is.

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

I agree that this is a long standing bug and that the proposed fix is the right way to go.

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

PR has been merged into master for 5.1, refined, and backported to 4.3.x and 5.0.x.

@spring-projects-issues spring-projects-issues added type: bug A general bug in: test Issues in the test module status: backported An issue that has been backported to maintenance branches labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.0.6 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants