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

fix: after panic in test body context switch to afterEach #89

Merged
merged 1 commit into from
May 15, 2024

Conversation

moeryomenko
Copy link
Contributor

If a panic occurs in the body of the test (no one catches it), in the defer chain the afterEachHook sets the provider test context to afterEach, common.TestError handles the wrong panic context. First at all, need catch panic after test execution, and then run afterEachHook

Signed-off-by: Maxim Eryomenko <maxim_eryomenko@rambler.ru>
@dkx86 dkx86 merged commit c7e2963 into ozontech:master May 15, 2024
3 checks passed
@moeryomenko moeryomenko deleted the fix-incorrect-context-on-panic branch May 15, 2024 09:40
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.

2 participants