1. 17 8月, 2019 3 次提交
    • S
      Migrate rest of test suite from JUnit 4 to JUnit Jupiter · 3f3e4192
      Sam Brannen 提交于
      This commit migrates the rest of Spring's test suite to JUnit Jupiter,
      except spring-test which will be migrated in a separate commit.
      
      See gh-23451
      3f3e4192
    • S
      Migrate parameterized tests in spring-core · 3df85c78
      Sam Brannen 提交于
      This commit migrates parameterized tests in spring-core using the
      "composed @ParameterizedTest" approach. This approach is reused in
      follow-up commits for the migration of the remaining modules.
      
      For a concrete example, see AbstractDataBufferAllocatingTests and its
      subclasses (e.g., DataBufferTests).
      
      Specifically, AbstractDataBufferAllocatingTests declares a custom
      @ParameterizedDataBufferAllocatingTest annotation that is
      meta-annotated with @ParameterizedTest and
      @MethodSource("org.springframework.core.io.buffer.AbstractDataBufferAllocatingTests#dataBufferFactories()").
      
      Individual methods in concrete subclasses are then annotated with
      @ParameterizedDataBufferAllocatingTest instead of @ParameterizedTest or
      @test.
      
      The approach makes the migration from JUnit 4 to JUnit Jupiter rather
      straightforward; however, there is one major downside. The arguments
      for a @ParameterizedTest test method can only be accessed by the test
      method itself. It is not possible to access them in an @BeforeEach
      method (see https://github.com/junit-team/junit5/issues/944).
      Consequently, we are forced to declare the parameters in each such
      method and delegate to a custom "setup" method. Although this is a bit
      cumbersome, I feel it is currently the best way to achieve fine grained
      parameterized tests within our test suite without implementing a custom
      TestTemplateInvocationContextProvider for each specific use case.
      
      Once https://github.com/junit-team/junit5/issues/878 is resolved, we
      should consider migrating to parameterized test classes.
      
      See gh-23451
      3df85c78
    • S
      Migrate test suite from JUnit 4 to JUnit Jupiter · 32cc32f9
      Sam Brannen 提交于
      This first commit for this issue:
      
      - allows JUnit Jupiter to be used for all tests
      - adds a dependency on mockito-junit-jupiter
      - migrates tests in spring-core to JUnit Jupiter, except parameterized
        tests
      
      The following script was developed in order to semi-automate the
      migration process.
      
      https://github.com/sbrannen/junit-converters/blob/master/junit4ToJUnitJupiter.zsh
      
      See gh-23451
      32cc32f9
  2. 16 8月, 2019 3 次提交
  3. 15 8月, 2019 1 次提交
    • B
      Move compile config to a Gradle convention · 71ddb861
      Brian Clozel 提交于
      This commit moves the compile configuration from the Gradle DSL to a
      convention. This configuration is not changing often, and we're using
      that opportunity to make the Java source compatibility a project
      property so as to easily recent JDKs this on the command line.
      
      See gh-23282
      71ddb861
  4. 14 8月, 2019 5 次提交
    • S
      Polishing · 76645644
      Sebastien Deleuze 提交于
      See gh-21778
      76645644
    • S
      Restore annotated code samples · db02d38c
      Sebastien Deleuze 提交于
      See gh-21778
      db02d38c
    • S
      Store refdoc preferred language · ec740559
      Sebastien Deleuze 提交于
      See gh-21778
      ec740559
    • J
      Avoid UndeclaredThrowableStrategy with 1.8 bytecode level (CGLIB 3.3) · 9bd3a535
      Juergen Hoeller 提交于
      ClassLoaderAwareUndeclaredThrowableStrategy fails with a VerifyError on recent JDKs after the CGLIB 3.3 upgrade. The alternative is to replace it with a plain ClassLoaderAwareGeneratorStrategy (extracted from CglibSubclassingInstantiationStrategy) and custom UndeclaredThrowableException handling in CglibMethodInvocation.
      
      See gh-23453
      9bd3a535
    • B
      Replace propdeps plugin with custom plugin · 561af5f8
      Brian Clozel 提交于
      Prior to this commit, the Spring Framework build would be using the
      propdeps Gradle plugin to introduce two new configurations to the build:
      "optional" and "provided". This would also configure related conventions
      for IDEs, adding those configurations to published POMs.
      
      This commit removes the need for this plugin and creates instead a
      custom plugin for an "optional" configuration. While the Eclipse IDE
      support is still supported, there is no need for specific conventions
      for IntelliJ IDEA anymore.
      This new plugin does not introduce the "provided" scope, as
      "compileOnly" and "testCompileOnly" are here for that.
      
      Also as of this commit, optional/provided dependencies are not published
      with the Spring Framework modules POMs annymore.
      Generally, these dependencies do not provide actionable information to
      the developers reading / tools consuming the published POMs.
      
      Optional/Provided dependencies are **not**:
      * dependencies you can add to enable some supported feature
      * dependencies versions that you can use to figure out CVEs or bugs
      * dependencies that might be missing in existing Spring applications
      
      In the context of Spring Framework, optional dependencies are just
      libraries are Spring is compiling against for various technical reasons.
      With that in mind, we are not publishing that information anymore.
      
      See gh-23282
      561af5f8
  5. 13 8月, 2019 9 次提交
  6. 12 8月, 2019 4 次提交
  7. 10 8月, 2019 3 次提交
  8. 09 8月, 2019 11 次提交
  9. 07 8月, 2019 1 次提交
    • S
      Use System.nanoTime() in StopWatch · a532afb1
      Sam Brannen 提交于
      Prior to this commit, StopWatch used System.currentTimeMillis() to
      track and report running time in milliseconds.
      
      This commit updates the internals of StopWatch to use System.nanoTime()
      instead of System.currentTimeMillis(). Consequently, running time is
      now tracked and reported in nanoseconds; however, users still have the
      option to retrieve running time in milliseconds or seconds.
      
      Closes gh-23235
      a532afb1