Commit Graph

1081 Commits

Author SHA1 Message Date
Juergen Hoeller 2861fc65bd Polishing 2019-09-27 10:17:56 +02:00
Sebastien Deleuze 091c512f0d Upgrade to Coroutines 1.3.2
Closes gh-23663
2019-09-25 21:51:04 +02:00
Sebastien Deleuze a4b278a269 Polishing 2019-09-25 17:02:05 +02:00
Andy Wilkinson 853d4c38ae Run webflux's tests in parallel to shorten long tail of builds (#23701)
When built in an environment where many Gradle build workers are
available, :spring-webflux:test is regularly the only task running at
the end of the build. Therefore, the build's overall execution time
can be reduced by running its tests in parallel, spreading the tests'
execution across the available workers. The configured number of forks
is a maximum with Gradle reducing this as necessary for environments
with low numbers of cores where multiple workers will not improve
build performance.

Closes gh-23701
2019-09-25 13:44:14 +02:00
Rossen Stoyanchev 30e1257dda Merge branch '5.1.x' 2019-09-24 13:39:42 +01:00
Sam Brannen 402046f3c7 Polish data buffer allocation tests 2019-09-24 14:24:36 +02:00
Sam Brannen 48c8d3a551 Polishing 2019-09-24 13:57:14 +02:00
Sam Brannen 38052e77b7 Fix bug in WebClientDataBufferAllocatingTests
Prior to this commit, the parameterized DataBufferFactory was never
actually used when setting up the WebClient for each test. This was due
to an oversight when migrating from JUnit 4 to JUnit Jupiter.

See: https://github.com/reactor/reactor-netty/issues/860

This commit fixes this by converting the existing @BeforeEach method to
a local setup method that is invoked from each
@ParameterizedDataBufferAllocatingTest method.

In addition, in order to avoid the 2 second "quiet period" that is
incurred when destroying the ReactorResourceFactory, this commit moves
the setup and destruction of the ReactorResourceFactory to new
@BeforeAll and @AfterAll methods.

The test instance lifecycle has also been switched to PER_CLASS to avoid
static state in the test class.
2019-09-24 13:45:50 +02:00
Rossen Stoyanchev 2794264480 Fix JettyRequestUpgradeStrategy initialization bug
Closes gh-23313
2019-09-24 11:34:46 +01:00
Sam Brannen f0e160fc67 Execute WebClientDataBufferAllocatingTests during all builds
This commit reverts b2704e1db6 and
configures the ReactorResourceFactory not to use global resources,
thereby allowing all tests in WebClientDataBufferAllocatingTests to
execute within approximately 2 seconds again on Mac OS.
2019-09-20 14:09:00 +02:00
Sam Brannen b2704e1db6 Execute WebClientDataBufferAllocatingTests only during PERFORMANCE build 2019-09-19 18:35:35 +02:00
Brian Clozel 74897bc52a Use Reactor's new Schedulers.boundedElastic()
Prior to this commit, Spring Framework would use `Schedulers.elastic()`
in places where we needed to process blocking tasks in a reactive
environment.

With reactor/reactor-core#1804, a new `Schedulers.boundedElastic()`
scheduler is available and achieves the same goal with added security;
it guarantees that resources are bounded.

This commit uses that new scheduler in the standard websocket client,
since the underlying API is blocking for the connection phase and we
need to schedule that off a web server thread.

Closes gh-23661
See gh-23665
2019-09-18 21:39:45 +02:00
Sebastien Deleuze 1dfe304da4 Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.

Closes gh-23524
2019-09-17 12:42:48 +02:00
Sebastien Deleuze 5a0216d657 Improve parity between Java and Kotlin router DSL
This commit adds variants with pattern + predicate to
Kotlin router DSLs, and vararg where necessary.

Closes gh-23524
2019-09-16 22:14:55 +02:00
Sam Brannen e7b2c93ede Delete dead code 2019-09-16 13:56:01 +02:00
Phillip Webb d945ae9191 Add blank line between java and javax imports
See gh-23539

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2019-09-16 13:41:59 +02:00
Rossen Stoyanchev b587003d8d Merge branch '5.1.x' 2019-09-12 21:52:41 +01:00
Rossen Stoyanchev f259fda8eb Fix checkstyle violations 2019-09-12 21:46:42 +01:00
Rossen Stoyanchev 7194261961 Merge branch '5.1.x' 2019-09-12 21:17:00 +01:00
Rossen Stoyanchev 6eb0e9e44b Unwrap decorated request or response
Closes: gh-23598
2019-09-12 13:42:12 +01:00
Sebastien Deleuze 5bb8c47b14 Rename fromObject to fromValue in BodyInserters
Closes gh-23587
2019-09-09 00:08:55 +02:00
Sam Brannen 5d5f9aceca Avoid accidental usage of JUnit 4 assumptions
This commit also avoids starting a server if an assumption fails.
2019-09-06 16:03:36 +02:00
Sam Brannen ef50777535 Polishing 2019-09-05 13:45:38 +02:00
Sam Brannen d9e3b8b9a5 Introduce default constructor in TomcatHttpServer 2019-09-05 13:45:38 +02:00
Sebastien Deleuze 40a55b412d Rename BodyBuilder#bodyAndAwait to bodyValueAndAwait 2019-09-05 13:34:11 +02:00
Phillip Webb deba2ed1b3 Add blank line between java and javax imports
See gh-23539
2019-09-04 22:05:46 -07:00
Sam Brannen 803643559a Merge branch '5.1.x' 2019-09-04 16:24:44 +02:00
Sam Brannen d036b5a283 Do not treat void and Void as simple types in BeanUtils
Prior to this commit, the isSimpleProperty() and isSimpleValueType()
methods in BeanUtils treated void and Void as simple types; however,
doing so does not make sense in this context, since void implies the
lack of a property or value.

This commit addresses this by explicitly excluding void and Void in the
logic in isSimpleValueType().

This commit also simplifies the implementation of
ViewResolutionResultHandler.supports(HandlerResult) to take advantage
of this change.

Closes gh-23573
2019-09-04 15:48:40 +02:00
Juergen Hoeller 48934cba1b Polishing 2019-09-04 12:19:08 +02:00
Sebastien Deleuze 9b33b0ad58 Rename CoroutinesUtils#invokeHandlerMethod to invokeSuspendingFunction 2019-09-03 23:41:53 +02:00
Sam Brannen 1c5b949df0 Fix ViewResolutionResultHandlerTests
See gh-23572
2019-09-03 16:56:50 +02:00
Arjen Poutsma 37398c669c Add toBodilessEntity to ClientResponse and WebClient.ResponseSpec
See gh-23498
2019-09-03 15:44:02 +02:00
Arjen Poutsma f5640cbfe0 Add ClientResponse::releaseBody
See gh-23498
2019-09-03 15:44:02 +02:00
Sam Brannen c78960a1ba Merge branch '5.1.x' 2019-09-03 14:21:39 +02:00
Sam Brannen f37ec90f2f Consider Void.class a primitive wrapper in ClassUtils
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
2019-09-03 14:02:24 +02:00
Sam Brannen bf758eab33 Fix assertion in HandlerMethodMappingTests.unregisterMapping() 2019-09-03 12:13:56 +02:00
Brian Clozel d4089747b8 Use dependency management in Framework build
Prior to this commit, the Spring Framework build would partially use the
dependency management plugin to import and enforce BOMs.

This commit applies the dependency management plugin to all Java
projects and regroups all version management declaration in the root
`build.gradle` file (versions and exclusions).

Some versions are overridden in specific modules for
backwards-compatibility reasons or extended support.

This commit also adds the Gradle versions plugin that checks for
dependency upgrades in artifact repositories and produces a report; you
can use the following:

    ./gradlew dependencyUpdates
2019-09-02 18:01:09 +02:00
Sebastien Deleuze a2e740c896 Polishing 2019-09-02 16:37:42 +02:00
Sebastien Deleuze ca02cc1194 Migrate to AssertJ in Kotlin tests
Closes gh-23475
2019-09-02 15:59:26 +02:00
Arjen Poutsma 3fcf4233a2 Merge branch '5.1.x' 2019-09-02 15:19:30 +02:00
Arjen Poutsma f748b1e68d Fix timing bug in DataBufferUtils::readAsynchronousFileChannel
This commit makes sure that reading is enabled after the current
signal has been processed, not while is is being processed. The bug
was only apparent while using the JettyClientHttpConnector, which
requests new elements continuously, even after the end of the
stream has been signalled.
2019-09-02 15:13:22 +02:00
康智冬 a6f4862f13 Fix typos related to indefinite articles
Closes gh-23555
2019-09-01 15:45:49 +02:00
Arjen Poutsma 67d48ed821 Merge branch '5.1.x' 2019-08-29 17:18:22 +02:00
Arjen Poutsma d709a69ff1 Remove buffering of encoded parts in MultipartHttpMessageWriter
Closes gh-23518
2019-08-29 16:34:36 +02:00
Sam Brannen c004ef888c Configure index in @ParameterizedTest display names
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
2019-08-28 17:06:23 +02:00
Sebastien Deleuze 52976246ac Remove bodyWithType extension from WebFlux
Since there is no more clash with the new bodyValue
method name.

Closes gh-23523
2019-08-28 13:30:16 +02:00
Sam Brannen 216ffcfe62 Fix copyright dates 2019-08-27 18:28:31 +02:00
Сергей Цыпанов 6ef75d76cd Simplify String concatenation
Closes gh-23470
2019-08-27 18:22:44 +02:00
Sam Brannen f8f3067419 Polishing 2019-08-27 12:27:18 +02:00
lijuny a0d50a546b Polish tests in spring-aop
This commit polishes tests in spring-aop by using
OrderComparator.sort() and lambda expressions instead of anonymous
classes where feasible.

Closes gh-23458
2019-08-27 12:01:30 +02:00