- 30 10月, 2019 1 次提交
-
-
由 Juergen Hoeller 提交于
Closes gh-23834
-
- 29 10月, 2019 3 次提交
-
-
由 Rossen Stoyanchev 提交于
Centralized maxInMemorySize exposed via CodecConfigurer along with ability to plug in an instance of MultipartHttpMessageWrite. Closes gh-23884
-
由 Brian Clozel 提交于
-
由 Rossen Stoyanchev 提交于
- Add maxInMemorySize property to Decoder and HttpMessageReader implementations that aggregate input to trigger DataBufferLimitException when reached. - For codecs that call DataBufferUtils#join, there is now an overloaded variant with a maxInMemorySize extra argument. Internally, a custom LimitedDataBufferList is used to count and enforce the limit. - Jackson2Tokenizer and XmlEventDecoder support those limits per streamed JSON object. See gh-23884
-
- 25 10月, 2019 1 次提交
-
-
由 Phillip Webb 提交于
Update `AnnotationTypeMappings` so that a custom `RepeatableContainers` instances can be used. Prior to this commit, only standard repeatables were used when reading the annotations. This works in most situations, but causes regressions for some `AnnotationUtils` methods. Fixed gh-23856
-
- 24 10月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
-
- 22 10月, 2019 2 次提交
-
-
由 Phillip Webb 提交于
Update `TypeMappedAnnotation` mirror resolution logic so that mapped annotation values are also considered. Prior to this commit, mirrors in more complex meta-annotation scenarios would not resolve correctly. Specifically, given the following: @interface TestAliased { @AliasFor(attribute = "qualifier") String value() default ""; @AliasFor(attribute = "value") String qualifier() default ""; } @TestAliased @interface TestMetaAliased { @AliasFor(annotation = Aliased.class, attribute = "value") String value() default ""; } @TestMetaAliased("test") @interface TestComposed { } A merged `@TestAliased` annotation obtained from a `@TestComposed` root annotation would return a `value` and `qualifier` of "". This was because the "value" and "qualifier" mirrors needed to be resolved against the `@TestMetaAliased` meta-annotation. They cannot be resolved against the declared `@TestComposed` annotation because it does not have any attributes. Our previous tests only covered a single depth scenario where `@TestMetaAliased` was used directly on the annotated element. Closes gh-23767 Co-authored-by: NSam Brannen <sbrannen@pivotal.io>
-
由 Sam Brannen 提交于
-
- 24 9月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
-
- 16 9月, 2019 2 次提交
-
-
由 Phillip Webb 提交于
See gh-23539 Co-authored-by: NSam Brannen <sbrannen@pivotal.io>
-
由 Phillip Webb 提交于
Ensure that results returned from keySet, entrySet & values are tracked to remove case insensitive keys from the source map. Closes gh-22821
-
- 12 9月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
Prior to this commit, a lot of work had been done to prevent improper use of testing Framework APIs throughout the codebase; however, there were still some loopholes. This commit addresses these loopholes by introducing additional Checkstyle rules (and modifying existing rules) to prevent improper use of testing framework APIs in production code as well as in test code. - Checkstyle rules for banned imports have been refactored into multiple rules specific to JUnit 3, JUnit 4, JUnit Jupiter, and TestNG. - Accidental usage of org.junit.Assume has been switched to org.junit.jupiter.api.Assumptions. - All test classes now reside under org.springframework packages. - All test classes (including abstract test classes) now conform to the `*Tests` naming convention. - As an added bonus, tests in the renamed ScenariosForSpringSecurityExpressionTests are now included in the build. - Dead JUnit 4 parameterized code has been removed from DefaultServerWebExchangeCheckNotModifiedTests. Closes gh-22962
-
- 09 9月, 2019 2 次提交
-
-
由 Sam Brannen 提交于
See gh-23605
-
由 Sam Brannen 提交于
Prior to this commit, Spring failed to determine that an XML config file was DTD-based if the DTD declaration was followed by a comment. This commit fixes this by modifying the consumeCommentTokens(String) algorithm in XmlValidationModeDetector so that both leading and trailing comments are properly consumed without losing any XML content. Closes gh-23605
-
- 06 9月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
This commit revives some previously disabled tests and converts some usage of @Disabled to @EnabledForTestGroups(...).
-
- 05 9月, 2019 1 次提交
-
-
由 Phillip Webb 提交于
See gh-23539
-
- 04 9月, 2019 1 次提交
-
-
由 Rossen Stoyanchev 提交于
The org.reactivestreams has 13 instead of 4 classes in 1.0.3 with the addition of Java 9 Flow adapters. This commit switches to using a different package reactor.util.annotation, also with a small number of classes, for this test.
-
- 03 9月, 2019 2 次提交
-
-
由 Sam Brannen 提交于
See gh-23572
-
由 Sam Brannen 提交于
Prior to this commit, ClassUtils.isPrimitiveOrWrapper() and ClassUtils.isPrimitiveWrapper() did not return true for Void.class. However, ClassUtils.isPrimitiveOrWrapper() did return true for void.class. This lacking symmetry is inconsistent and can lead to bugs in reflective code. See: https://github.com/spring-projects/spring-data-r2dbc/issues/159 This commit addresses this by adding an entry for Void.class -> void.class in the internal primitiveWrapperTypeMap in ClassUtils. Closes gh-23572
-
- 02 9月, 2019 2 次提交
-
-
由 Sebastien Deleuze 提交于
Closes gh-23475
-
由 Arjen Poutsma 提交于
-
- 28 8月, 2019 2 次提交
-
-
由 Sam Brannen 提交于
This commit prepends "[{index}] " to all custom display names configured via @ParameterizedTest. This provides better diagnostics between the "technical names" reported on the CI server vs. the "display names" reported within a developer's IDE. See gh-23451
-
由 Sam Brannen 提交于
This commit introduces a test that verifies that PathMatchingResourcePatternResolver can find files in the filesystem that contain hashtags (#) in their names. See gh-23532
-
- 23 8月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
This is an attempt to solve a build issue on Microsoft Windows. See gh-23507
-
- 20 8月, 2019 2 次提交
-
-
由 Sam Brannen 提交于
Due to a bug (or "unintentional feature") in JUnit 4, overridden test methods not annotated with @test are still executed as test methods; however, JUnit Jupiter does not support that. Thus, prior to this commit, some overridden test methods in spring-core were no longer executed after the migration from JUnit 4 to JUnit Jupiter. This commit addresses this issue for such known use cases, but there are likely other such use cases within Spring's test suite. See gh-23451
-
由 Sam Brannen 提交于
See gh-23451
-
- 19 8月, 2019 2 次提交
-
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-
- 17 8月, 2019 4 次提交
-
-
由 Sam Brannen 提交于
Closes gh-23476
-
由 Sam Brannen 提交于
This commit removes the JUnit 4 dependency from all modules except spring-test which provides explicit JUnit 4 support. This commit also includes the following. - migration from JUnit 4 assertions to JUnit Jupiter assertions in all Kotlin tests - migration from JUnit 4 assumptions in Spring's TestGroup support to JUnit Jupiter assumptions, based on org.opentest4j.TestAbortedException - introduction of a new TestGroups utility class than can be used from existing JUnit 4 tests in the spring-test module in order to perform assumptions using JUnit 4's Assume class See gh-23451
-
由 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
-
由 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
-
- 12 8月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
See gh-23451
-
- 09 8月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
-
- 07 8月, 2019 5 次提交
-
-
由 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
-
由 Sam Brannen 提交于
Since arbitrary levels of proxies do not occur, this commit replaces the `while` loop in SerializableTypeWrapper.unwrap() with a simple `if` statement. Closes gh-23415
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
Prior to this commit, AnnotationAttributes#assertNotException checked if the attribute value was an instance of Exception. Although this was typically sufficient, the scope was not always broad enough -- for example, if AnnotationReadingVisitorUtils#convertClassValues stored a Throwable in the map (such as a LinkageError). This commit fixes this by checking for an instance of Throwable in AnnotationAttributes#assertNotException. Closes gh-23424
-
- 01 8月, 2019 1 次提交
-
-
由 Phillip Webb 提交于
Deprecate all mutation methods in `MethodParameter` in favor of factory methods that return a new instance. Existing code that previously relied on mutation has been updated to use the replacement methods. Closes gh-23385
-