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

@DirtiesContext #156

Open
Jian-Min-Huang opened this issue Oct 9, 2020 · 0 comments
Open

@DirtiesContext #156

Jian-Min-Huang opened this issue Oct 9, 2020 · 0 comments
Labels
keyword technical keyword
Milestone

Comments

@Jian-Min-Huang
Copy link
Owner

Jian-Min-Huang commented Oct 9, 2020

@DirtiesContext

  • Sometimes you will run many tests in once time, so the Spring Beans value may not be clean.
  • We need this annotation to clean the context.

Class Level

  • BEFORE_CLASS: Before current test class
  • BEFORE_EACH_TEST_METHOD: Before each test method in the current test class
  • AFTER_EACH_TEST_METHOD: After each test method in the current test class
  • AFTER_CLASS: After the current test class

Method Level

  • BEFORE_METHOD: Before the current test method
  • AFTER_METHOD: After the current test method

References

@Jian-Min-Huang Jian-Min-Huang added the keyword technical keyword label Oct 9, 2020
@Jian-Min-Huang Jian-Min-Huang changed the title Dirtiescontext @DirtiesContext Oct 18, 2020
@Jian-Min-Huang Jian-Min-Huang added this to the 2020/10 milestone Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keyword technical keyword
Projects
None yet
Development

No branches or pull requests

1 participant