1. 08 4月, 2021 5 次提交
  2. 07 4月, 2021 3 次提交
  3. 02 4月, 2021 2 次提交
  4. 01 4月, 2021 3 次提交
  5. 31 3月, 2021 2 次提交
  6. 30 3月, 2021 5 次提交
  7. 29 3月, 2021 2 次提交
  8. 23 3月, 2021 4 次提交
  9. 22 3月, 2021 1 次提交
  10. 18 3月, 2021 1 次提交
    • S
      Honor class-level @DirtiesContext if test class is disabled via SpEL · e4f753e3
      Sam Brannen 提交于
      Prior to this commit, if a test class annotated with @DirtiesContext
      and @EnabledIf/@DisabledIf with `loadContext = true` was disabled due
      to the evaluated SpEL expression, the ApplicationContext would not be
      marked as dirty and closed.
      
      The reason is that @EnabledIf/@DisabledIf are implemented via JUnit
      Jupiter's ExecutionCondition extension API which results in the entire
      test class (as well as any associated extension callbacks) being
      skipped if the condition evaluates to `disabled`. This effectively
      prevents any of Spring's TestExecutionListener APIs from being invoked.
      Consequently, the DirtiesContextTestExecutionListener does not get a
      chance to honor the class-level @DirtiesContext declaration.
      
      This commit fixes this by implementing part of the logic of
      DirtiesContextTestExecutionListener in
      AbstractExpressionEvaluatingCondition (i.e., the base class for
      @EnabledIf/@DisabledIf support). Specifically, if the test class for an
      eagerly loaded ApplicationContext is disabled,
      AbstractExpressionEvaluatingCondition will now mark the test
      ApplicationContext as dirty if the test class is annotated with
      @DirtiesContext.
      
      Closes gh-26694
      e4f753e3
  11. 17 3月, 2021 1 次提交
  12. 16 3月, 2021 11 次提交