Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

Commit

Permalink
Correcing callback order and propagate error
Browse files Browse the repository at this point in the history
Partial fix for issue #118.

Need to figure out some way to handle that Spring uses a
ThreadLocal for keeping track of the TestContext to fix last problem.
  • Loading branch information
Kantis committed May 27, 2024
1 parent 4c7c4ec commit d08185e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class SpringTestExtension(private val mode: SpringTestLifecycleMode = SpringTest
}
val result = execute(testCase)
if (testCase.isApplicable()) {
testContextManager().afterTestMethod(testCase.spec, methodName, null as Throwable?)
testContextManager().afterTestExecution(testCase.spec, methodName, null as Throwable?)
testContextManager().afterTestExecution(testCase.spec, methodName, result.errorOrNull)
testContextManager().afterTestMethod(testCase.spec, methodName, result.errorOrNull)
}
return result
}
Expand Down

0 comments on commit d08185e

Please sign in to comment.