Commit Graph

19692 Commits

Author SHA1 Message Date
Sam Brannen b9013ada9f Abort MBeanServer tests if BindException encountered
This commit builds on the previous commit but covers exceptions thrown
by @BeforeEach and @AfterEach methods as well as @Test methods.
2019-09-24 19:20:39 +02:00
Sam Brannen 435cc67026 Abort MBeanServer tests if BindException encountered 2019-09-24 18:57:30 +02:00
Andy Wilkinson d0adadf3ca Capture maxParallelForks of Test tasks in build scans
The parallel forks configuration of Test tasks can have a big impact
on their execution time. This commit updates the build can
configuration to capture each Test task's maxParallelForks
configuration as custom values in the build scan. This will make this
data available when comparing scans which will be useful as we
experiment with different parallel fork settings to reduce the
build's overall execution time.

Closes gh-23691
2019-09-24 18:25:24 +02:00
Andy Wilkinson 2570379824 Obfuscate IP addresses in build scans
Closes gh-23690
2019-09-24 18:18:52 +02:00
Sam Brannen e6678f40e8 Make DataSize constants final 2019-09-24 15:32:26 +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
Rossen Stoyanchev 955000699a Add getRawStatusCode() to ExchangeResult
Closes gh-23630
2019-09-24 12:58:52 +01: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 99d9dacc4f Log sendBufferSizeLimit exceeded at warn
Closes gh-23534
2019-09-24 12:09:41 +01:00
Sam Brannen bba3553dfb Polish SpringVersion 2019-09-24 12:43:10 +02:00
Johnny Lim d6d3a9e232 Polish ImportOrderCheck Checkstyle rule
Closes gh-23685
2019-09-24 12:36:51 +02:00
Rossen Stoyanchev 2794264480 Fix JettyRequestUpgradeStrategy initialization bug
Closes gh-23313
2019-09-24 11:34:46 +01:00
Rossen Stoyanchev 4edc7196fb Refine disconnected client handling in WebFlux
If an error looks like a "disconnected client" but the response is not
yet committed then it can't be an I/O error from writing to the server
response. It is most likely as a result of a remote call as part of
request handling.

Not setting the response to 500 in this case results in a 200 response
status despite the error. Even if it was an I/O error from the server
response, setting the status won't impact a failed response.

Closes gh-23319
2019-09-24 11:09:42 +01:00
Sebastien Deleuze 840249778a Polish Kotlin reference documentation for WebMvc.fn
See gh-23657
2019-09-24 10:14:16 +02:00
Sebastien Deleuze 97026f1ec3 Fix ServerRequestExtensionsTests on Java 13
Closes gh-23677
2019-09-24 09:47:57 +02:00
Rossen Stoyanchev 2888b032a1 Polish rsocket.adoc 2019-09-24 06:08:06 +01:00
Rossen Stoyanchev 93371cc2ac Polish 2019-09-23 16:35:08 +01:00
Brian Clozel 72be38cf2c Fix API Diff Gradle task
Prior to this change, the Gradle API Diff task was failing due to a
missing class (a Guava class) during processing. This might be a
dependency that was previously brought by some other dependency.

This commit adds that dependency as a workaround, and improves the
Gradle API Diff task to only select relevant projects when running the
task (projects using the Java Plugin and the Maven Publish Plugin).
2019-09-23 17:13:49 +02:00
Brian Clozel 716f928e79 Upgrade to Spring Doc Resources 0.1.3.BUILD-SNAPSHOT
See gh-23679
2019-09-23 16:53:39 +02:00
Arjen Poutsma 9ffecc5059 Polish reference documentation for WebMvc.fn 2019-09-23 16:08:50 +02:00
Arjen Poutsma 652bbdad2a Add reference documentation for WebMvc.fn
This commit introduces reference documentation for WebMvc.fn, the
functional web framework.

Closes gh-23657
2019-09-23 15:27:49 +02:00
Rossen Stoyanchev e2baf7277b Use metadata slice
Take a slice of the metadata if not using composite metadata to allow
reading it multiple times. For composite metadata this is not an isuse
as it is ensured by the underlying RSocket Java API.
2019-09-23 13:32:28 +01:00
Rossen Stoyanchev 0ae7154518 Fix checkstyle violation 2019-09-23 13:09:06 +01:00
Rossen Stoyanchev 88bb2aabbf RSocket reference documentation
Closes: gh-23147
2019-09-23 12:18:03 +01:00
Sam Brannen 2572cd0503 Make PathPatternParserTests compatible with JDK 13
Closes gh-23669
2019-09-21 17:33:28 +02:00
Sam Brannen 4acd180fa3 Document that setting static final fields is unsupported
This commit updates the documentation for ReflectionUtils and
ReflectionTestUtils to point out that setting static final fields is
not supported.
2019-09-21 15:42:09 +02:00
Sam Brannen fccdb8cf60 Polish ReflectionUtils
This commit removes dead code in ReflectionUtils and improves the
exception message for field access errors.
2019-09-21 15:29:03 +02:00
Juergen Hoeller 4882dfcc0d Consistent relative path treatment (no accidental URL fragment symbol)
Closes gh-23532
2019-09-20 21:55:27 +02:00
Juergen Hoeller 957924ace2 Avoid early log provider initialization (and LogAccessor dependency)
Closes gh-23655
2019-09-20 21:54:53 +02:00
Juergen Hoeller e68132686d Restore lenient target type handling for FactoryBean definitions
Closes gh-23561
2019-09-20 21:54:32 +02:00
Juergen Hoeller a48c13ae73 Avoid deprecated usingWhen method in Reactor 3.3
Closes gh-23562
2019-09-20 21:54:18 +02:00
Mark Paluch 393a81d4a9 Omit cancellation of transactional Monos in TransactionOperator
TransactionOperator.as(Mono) now no longer short-cuts via a Flux.next() but provides an implementation via Mono.usingWhen(…).
The short-cut previously issued a cancellation signal to the transactional Mono causing the transaction cleanup to happen without a handle for synchronization.

Using Mono.usingWhen(…) initiates transaction cleanup when the Mono completes eliminating the need for cancellation of the transactional Publisher.

This change does not fully fix gh-23304 but it softens its impact because TransactionalOperator.transactional(Mono) avoids cancellation.
2019-09-20 20:48:39 +02: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 3603e0c448 Set Spring-specific name for shutdown hook thread
Prior to this commit, the name of the Thread registered via
ConfigurableApplicationContext#registerShutdownHook() was the generic,
default thread name ("Thread-#"). That made it difficult to discern
which executing thread was the Spring ApplicationContext shutdown hook.

This commit improves diagnostics by setting the thread name of the
ApplicationContext shutdown hook to "SpringContextShutdownHook".

Closes gh-23670
2019-09-20 13:16:59 +02:00
Sam Brannen 734ceed301 Polish contribution
See gh-23658
2019-09-19 22:02:19 +02:00
i321222 fde7b1e545 Avoid ArrayIndexOutOfBoundsException in SpEL's Indexer
When index == arrayLength, the array index is also out of bounds.

For this scenario, a SpelEvaluationException should be thrown instead
of ArrayIndexOutOfBoundsException.

Closes gh-23658
2019-09-19 22:01:10 +02:00
Sam Brannen b2704e1db6 Execute WebClientDataBufferAllocatingTests only during PERFORMANCE build 2019-09-19 18:35:35 +02:00
Sam Brannen c256af4ef7 Polishing 2019-09-19 16:31:07 +02:00
Sam Brannen d611c7484f Fix Checkstyle violation 2019-09-19 16:21:44 +02:00
Sam Brannen 9811e21432 Merge branch '5.1.x' 2019-09-19 15:57:33 +02:00
Sam Brannen 8f6846827d Ensure ClassFilter and MethodMatcher implementations are cacheable
While resolving the regression raised in gh-23571, it came to our
attention that not all of our ClassFilter and MethodMatcher
implementations were properly cacheable with CGLIB generated proxies
due to missing (or improper) equals() and hashCode() implementations.

Although such deficiencies may not manifest themselves as bugs in Core
Spring's default arrangements, these might cause issues in custom
arrangements in user applications.

This commit addresses this by ensuring that ClassFilter and
MethodMatcher implementations properly implement equals() and
hashCode(). In addition, missing toString() implementations have been
added to improve diagnostics for logging and debugging.

Closes gh-23659
2019-09-19 15:35:17 +02:00
Brian Clozel 809009e6c4 Rename RSocketStrategies.Builder.metadataExtractors
This commit renames the `metadataExtractors` method to something that is
closer to the actual intent: addming new metadata extractors against the
registry given as a parameter of the `Consumer`.

The method is renamed to `metadataExtractorRegistry`.
2019-09-19 14:54:36 +02:00
Stephane Nicoll e06d2a9c57 Stop using libs-release
This commit makes sure we narrow down dependencies of the Spring
Framework to only Maven central. Optional dependencies that are not
available on Maven Central are now served from a more specific
repository (`libs-spring-framework-build`).

Closes gh-23124
2019-09-19 13:27:49 +02:00
Sebastien Deleuze 02d70424ad Mention Kotlin code samples in the Kotlin refdoc 2019-09-19 10:44:50 +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 90b5e6ab48 Polishing
See gh-23649
2019-09-18 19:29:15 +02:00
Sebastien Deleuze 5adc3d6666 Fix RSocketRequester API for requests without payload
This commit makes it possible to send requests without
requiring to call data(Mono.empty()). It introduces a
dedicated MetadataSpec interface and merge ResponseSpec
into RequestSpec for more flexibility.

Closes gh-23649
2019-09-18 16:00:16 +02:00
Brian Clozel ab58e29397 Remove scope information from published BOM
It seems that publishing a Gradle platform as a Maven POM writes all
dependencies with their scope information by default.

We don't want that when publishing the Spring Framework BOM, as it
forces the scope on projects depending on the BOM, unless they've
specified the scope when they added the dependency to their build.

Typically, developers could get spring-test as a compile dependency
without this change.

This commit removes the scope information from the published BOM.

Fixes gh-23660
2019-09-18 15:27:59 +02:00