Commit Graph

232 Commits (68b25598b9ca7f6ece1880b849fcaf8b04c5e7ea)

Author SHA1 Message Date
dreis2211 507eb9498b Use Class.getDeclaredConstructor().newInstance()
See gh-21913
4 years ago
Andy Wilkinson 96e6b74894 Merge branch '2.2.x' into 2.3.x
Closes gh-22243
4 years ago
Andy Wilkinson a0f1424393 Polish "Fix unwrapping of captured PrintStream in test support's OutputCapture"
See gh-22214
4 years ago
XenoAmess 75a64bd901 Fix unwrapping of captured PrintStream in test support's OutputCapture
See gh-22214
4 years ago
Andy Wilkinson 0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
4 years ago
Phillip Webb ad1248e4ec Replace "folder" with "directory"
Consistently use the term "directory" instead of "folder"

Closes gh-21218
5 years ago
Stephane Nicoll b5e23e7405 Update copyright year of changed files
See gh-20020
5 years ago
Johnny Lim b67ece48e4 Polish
See gh-20020
5 years ago
dreis2211 d8e2349e47 Use Supplier variants of Assert
See gh-19864
5 years ago
dreis2211 d75de39456 Upgrade to JUnit Jupiter 5.6.0
See gh-19907
5 years ago
Stephane Nicoll e044817fe7 Migrate remaining use of ClassLoader.loadClass to Class.forName
Closes gh-19824
5 years ago
Stephane Nicoll 95be419527 Use Class.forName rather than ClassLoader.loadClass
This commit changes uses of ClassLoader.loadClass to Class.forName for
consistency with what was initiated in #19342 and better compatibility
with GraalVM.

Closes gh-19824
5 years ago
Phillip Webb e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
5 years ago
Phillip Webb 0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
5 years ago
Phillip Webb fd792cedaf Polish DisabledIfDockerUnavailable
Convert `DisabledIfDockerUnavailable` to be an annotation and make
it slightly less noisy.
5 years ago
Andy Wilkinson 714a187d8f Rework dep mgmt again to avoid consumers picking up strict constraints
This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.

See gh-19609
5 years ago
Andy Wilkinson aefe52e4d0 Revert "Rework dep management to avoid consumers picking up strict constraints"
This reverts commit b34a311d02 as,
having disabled the publishing of Gradle's module metadata (4f75ab5),
the changes are no longer needed.

See gh-19609
5 years ago
Phillip Webb 862462b791 Update copyright year of changed files 5 years ago
Phillip Webb f57281340c Merge branch '2.2.x' 5 years ago
Phillip Webb 3cfbfebbb1 Merge branch '2.1.x' into 2.2.x 5 years ago
Phillip Webb 9bd49562fe Update copyright year of changed files 5 years ago
Andy Wilkinson b34a311d02 Rework dep management to avoid consumers picking up strict constraints
Previously, enforcedPlatform dependencies were using to pull in the
constraints defined in spring-boot-dependencies and
spring-boot-parent and applied them strictly so that the constrained
version had to be used. This worked as intended in Spring Boot's own
build but incorrectly enforced those same strict version requirements
on external consumers of Spring Boot's modules.

This commit reworks how Spring Boot defines its internal dependency
management so that platform dependencies are exposed to external
consumers while enforced platform dependencies are using internally.

See gh-19609
5 years ago
Stephane Nicoll ca1710ee56 Upgrade to Apache Cassandra 4.3.1
See gh-19588
5 years ago
Brian Clozel e0171a5da8 Polish 5 years ago
Andy Wilkinson b5ae8b0af5 Disable tests that use Docker when Docker is unavailable
Closes gh-19616
5 years ago
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
5 years ago
Andy Wilkinson bdffa860d9 Increase startup timeout for Docker containers
Closes gh-19569
5 years ago
Stephane Nicoll 2c1e81adf0 Polish 5 years ago
Phillip Webb 83d4d94e8b Cache ModifiedClassPathClassLoaders
Closes gh-18694
5 years ago
Phillip Webb 8d08d654d1 Merge branch '2.1.x'
Closes gh-18693
5 years ago
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
5 years ago
Andy Wilkinson 3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
5 years ago
Andy Wilkinson 29080b87ec Protect autoconfigure module against slow starting test containers 5 years ago
dreis2211 07b857e57a Use disabledWithoutDocker option for @Testcontainers
See gh-18095
5 years ago
dreis2211 b4350a9d96 Remove unnecessary blank lines
See gh-18089
5 years ago
dreis2211 3e35a6616c Fix duplicated words
See gh-18004
5 years ago
thelproad 9c1f503e46 Simplify if statements
See gh-17884
5 years ago
Phillip Webb da4f436140 Change SearchStrategy EXHAUSTIVE to TYPE_HIERARCHY
Fixup references following upstream Spring Framework change.
5 years ago
Phillip Webb 8bc780762a Merge branch '2.1.x' 5 years ago
Phillip Webb fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb 913e831f4e Merge '1.5.x' into 2.0.x 5 years ago
Andy Wilkinson 41957ec2ad Polish "Polish OutputCapture and its JUnit Jupiter extension"
See gh-17049
5 years ago
dreis2211 2038fac825 Remove testsupport.assertj package
See gh-17557
5 years ago
Phillip Webb a9ba7080ce Merge branch '2.1.x' 5 years ago
dreis2211 4ec035977b Polish testsupport.junit.platform package
See gh-17524
5 years ago
Phillip Webb eff1147ccc Rename classpath runner package
Remove `runner` since we're no longer tied to JUnit 4.

See gh-17491
5 years ago
Phillip Webb 1117fdb2b3 Make ModifiedClassPathExtension package private
Meta-annotate `ClassPathExclusions` and `ClassPathOverrides` with
so that the `ModifiedClassPathExtension` no longer needs to be
used directly.

See gh-17491
5 years ago
Phillip Webb b6ec1332a0 Polish ModifiedClassPathClassLoader
Remove the `ModifiedClassPathClassLoaderFactory` in favor of
factory methods on `ModifiedClassPathClassLoader`.

See gh-17491
5 years ago
Phillip Webb 4fe5e9e31e Remove direct junit-platform-launcher dependency
Replace any direct `junit-platform-launcher` dependencies and instead
rely on the test runner providing it. Launcher related class are not
handled via reflection.

This update allows us to workaround SUREFIRE-1679.

Closes gh-17517
5 years ago
Phillip Webb 543fcdbbfd Delete internal OutputCaptureRule
Delete our internal `OutputCaptureRule` since we not longer have any
tests using it.
5 years ago
Phillip Webb 13b39cbbbf Delete ModifiedClassPathRunner
Delete `ModifiedClassPathRunner` since we no longer have any tests
that use it.

See gh-17491
5 years ago
Phillip Webb bd81bb90eb Polish ModifiedClassPath support
See gh-17491
5 years ago
dreis2211 2a4c48cb91 Add JUnit 5 ModifiedClassPathExtension
Add a JUnit 5 extension that allows tests to be run with a
modified classpath. Since JUnit 5 does not currently offer a way
to run tests with a different classpath, we instead fake the
original invocation and launch an entirely new run for each
method.

See gh-17491
5 years ago
dreis2211 90d824f6cb Extract ModifiedClassPathClass logic
Extract classes from `ModifiedClassPathRunner` so that they can
be reused.

See gh-17491
5 years ago
Phillip Webb 01933f9b06 Merge previously split strings
Merge some string lines that were previously split because of the
90 chars wide formatting.
5 years ago
Phillip Webb cdf43a7489 Polish 5 years ago
Phillip Webb 8d4a2add63 Allow OutputCaptureRule to be used with AssertJ
Update `OutputCaptureRule` so that it now implements
`CapturedOutput` and can be used directly with AssertJ.

Closes gh-17512
5 years ago
dreis2211 32549cfc85 Remove folder that only contains package-info
See gh-17471
5 years ago
Andreas Gebhardt ed7cfedb51 Fix JavaDoc within spring-boot-test-support
See gh-17443
5 years ago
Andy Wilkinson 2816635418 Polish 5 years ago
Phillip Webb a66c4d3096 Unify method visibility of private classes
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
5 years ago
Phillip Webb 605599138e Merge branch '2.1.x' 5 years ago
Phillip Webb 92bff3c328 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb cfeb0239b7 Merge branch '1.5.x' into 2.0.x 5 years ago
Madhura Bhave 30cfe7b4c5 Polish 6 years ago
Phillip Webb b3d5cd538d Add JUnit 5 checkstyle rules
Add a rule to enforce JUnit 5 usage and conventions.

Closes gh-17093
6 years ago
Andy Wilkinson b18fffaf14 Move tests to JUnit 5 wherever possible 6 years ago
Andy Wilkinson aef92b9295 Merge branch '2.1.x'
Closes gh-17079
6 years ago
Andy Wilkinson 24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
6 years ago
Andy Wilkinson c6c139d980 Merge branch '1.5.x' into 2.0.x 6 years ago
Brian Clozel c74badd4f2 Auto-configure Elasticsearch REST client in Spring Data
This commit auto-configures the Elasticsearch REST client support
as a template for Spring Data Elasticsearch. As of this commit,
using the transport client is still possible but developers
should migrate.

This commit also removes the deprecated annotation on the
Elasticsearch auto-configuration for the transport client, since
this deprecation notice is already present on the configuration
property.

Closes gh-17024
Closes gh-16542
6 years ago
Phillip Webb ad5e905bd7 Update copyright header of changed files 6 years ago
Phillip Webb 68aec8b6ee Polish 6 years ago
Andy Wilkinson 23f803c6b6 Upgrade to Hamcrest 2.1, switch to hamcrest artifact from -core and -library
Closes gh-15555
6 years ago
Madhura Bhave 684a1c7a3c Migrate tests to JUnit5 testcontainer extensions
Closes gh-15456
6 years ago
Phillip Webb 17aaf26590 Use consistent javadoc style for annotation links
Closes gh-13920
6 years ago
Phillip Webb b879972d0d Migrate to MergedAnnotations API
Migrate away from `AnnotationUtils` and `AnnotatedElementUtils`
when possible to the new `MergedAnnotations` API.

Closes gh-16551
6 years ago
Andy Wilkinson 36c1c051b8 Merge branch '2.1.x' 6 years ago
Andy Wilkinson e23f72c8b0 Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 6 years ago
Andy Wilkinson b828b398b5 Merge branch '2.1.x' 6 years ago
Andy Wilkinson a36aa67b52 Merge branch '2.0.x' into 2.1.x 6 years ago
Spring Operator 3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
6 years ago
Andy Wilkinson d6a869fa98 Switch to Jakarta EE API dependencies where possible
Closes gh-16113
Closes gh-16112
Closes gh-16111
Closes gh-15916
Closes gh-15689
6 years ago
Andy Wilkinson 747e419db1 Merge branch '2.1.x' 6 years ago
Andy Wilkinson 9fb0b97f96 Decorate test containers so tests are skipped without Docker
Closes gh-15901
Closes gh-15638
6 years ago
Andy Wilkinson db31e42751 Merge branch '2.1.x' 6 years ago
Andy Wilkinson a975c0ad16 Use Testcontainers’ CassandraContainer rather than our own
Closes gh-15901
6 years ago
Andy Wilkinson 7e51e1a076 Merge branch '2.1.x' 6 years ago
Michael Simons 316126e8f0 Replace custom Neo4j container with Testcontainers version
See gh-15638
6 years ago
Andy Wilkinson ddabfe3fcc Deploy spring-boot-test-support so it's available downstream
Concourse builds spring-boot-tests separately from spring-boot-project
and relies on modules from the latter being available in the
distribution repository when building the former. This commit enables the
deployment of spring-boot-test-support from spring-boot-project so that it
is added to the distribution repository and is therefore available when
building spring-boot-tests. It is then excluded when putting to the
Artifactory resource as we do not want it to be published.

See gh-15471
6 years ago
Andy Wilkinson 61d04db0d7 Minimize and centralize assumptions about build output
Closes gh-15471
6 years ago
Andy Wilkinson 62fbf48446 Start Elasticsearch with single-node discovery type
See gh-15441
6 years ago
Andy Wilkinson 47fc35105d Allow more time for the Elasticsearch container to start
See gh-15441
6 years ago
Andy Wilkinson 2b453bbb16 Minimise dependencies on Log4j2
Closes gh-15441
6 years ago
Andy Wilkinson 72ad0cc6be Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 3fd0380359 Correct optional dependency declarations in spring-boot-test-support
Closes gh-15371
6 years ago
Phillip Webb 94798062ab Configure Cassandra JMX Reporting
Allow Cassandra JMX reporting to be configured via a property, and
disable it by default since it won't work with Dropwizard metrics 4.

Also update some of our own tests to explicitly disable it.

Closes gh-14778
6 years ago
Phillip Webb d76bba5e6f Migrate from ExpectedException rule to AssertJ
Replace ExpectedException JUnit rules with AssertJ exception
assertions.

Closes gh-14336
6 years ago
Andy Wilkinson c1b864c826 Polish 6 years ago
Phillip Webb 894e0e11d4 Switch from Aether to Maven Resolver
Replace Aether dependencies with Maven Resolver following the Eclipse
EOL announcement for Aether.

Closes gh-7627
6 years ago
Stephane Nicoll eedeaa29e5 Polish "Replace loops with Arrays.setAll where possible"
Closes gh-14125
6 years ago
dreis2211 0bc66dc4a9 Replace loops with Arrays.setAll where possible
See gh-14125
6 years ago
Andy Wilkinson de7899fba4 Improve reliability by give Cassandra more time and attempts to start 6 years ago
Johnny Lim 75639aa682 Polish
Closes gh-13192
7 years ago
dreis2211 15d67d6b12 Remove MockServletWebServer.emptyEnumeration()
Closes gh-13084
7 years ago
Phillip Webb 2d70a7ae5e Polish caught exception names
Prefer `ex` over `e`.
7 years ago
Andy Wilkinson c9f04c3977 Avoid race between container starting and getting mapped port 7 years ago
Andy Wilkinson f6cc1cbd76 Make Testcontainer wait strategies final 7 years ago
Andy Wilkinson f39cea0428 Try to stabilize build by giving Cassandra longer to start 7 years ago
Andy Wilkinson 6c504a5098 Fix deprecation warnings in Testcontainers wait strategies
See gh-12821
7 years ago
Madhura Bhave 9c7612e681 Fix NPE in WaitStrategy used for test containers 7 years ago
Phillip Webb 98a2a91d16 Polish 7 years ago
Stephane Nicoll 006decea2a Merge branch '1.5.x' 7 years ago
Phillip Webb 4b9c3c137e Polish Collection.toArray
Consistently use `StringUtils.toStringArray`, `ClassUtils.toClassArray`
or zero length when converting collections to arrays.

Fixes gh-12160
7 years ago
Andy Wilkinson 5522174e96 Provide package info for all packages included in javadoc 7 years ago
dreis2211 c1675c2d5f Use InvocationOnMock.getArgument() where possible
Closes gh-11818
7 years ago
dreis2211 a7663c88d3 Replace casted Mockito.any() calls
Closes gh-11817
7 years ago
Andy Wilkinson 1a1a62b744 Protect tests against Cassandra startup failures
On CI, Cassandra running inside the Docker container sometimes fails
to start or the start times out. This has nothing to do with Boot so
we  attempt to protect our tests from the flakiness of the container
by allowing 3 startup attempts.
7 years ago
Phillip Webb 85d3f5a180 Fix NPE in test containers
Fix NPE accidentally introduced during refinement.
7 years ago
Phillip Webb 201da97774 Further refine test containers 7 years ago
Andy Wilkinson 996b3ef7f2 Refine test containers 7 years ago
Madhura Bhave e28915bd4b Make integration tests self-contained
Fixes gh-10516
7 years ago
Stephane Nicoll 47c8b5731a polish 7 years ago
Stephane Nicoll 23218add90 Polish 7 years ago
Johnny Lim 6d54072e04 Remove "final" keywords
Closes gh-11294
7 years ago
Stephane Nicoll 9965221378 Merge branch '1.5.x' 7 years ago
Phillip Webb b6166dc12a Move `Assume` to spring-boot-test-support
Fixes gh-10866
7 years ago
Johnny Lim 6168fae720 Remove explicit type arguments
See gh-10494
7 years ago
Phillip Webb 0be119eadd Don't deploy spring-boot-test-support
Fixes gh-10518
7 years ago
Phillip Webb b87f9c11f1 Fix POMs for the updated build/release process
Fix POMs following project relocations and apply CI friendly Maven
conventions.

See gh-9316
7 years ago
Phillip Webb 0ba4830b4f Relocate projects to spring-boot-project
Move projects to better reflect the way that Spring Boot is released.

The following projects are under `spring-boot-project`:

  - `spring-boot`
  - `spring-boot-autoconfigure`
  - `spring-boot-tools`
  - `spring-boot-starters`
  - `spring-boot-actuator`
  - `spring-boot-actuator-autoconfigure`
  - `spring-boot-test`
  - `spring-boot-test-autoconfigure`
  - `spring-boot-devtools`
  - `spring-boot-cli`
  - `spring-boot-docs`

See gh-9316
7 years ago