Skip to content

Some tests fail in a non-clean build after the project's version is changed #21606

@wilkinsona

Description

@wilkinsona

We end up with two binaries and some of the tests only expect one. For example:

java.lang.AssertionError: 
Expected size:<1> but was:<2> in:
<[/Users/awilkinson/dev/spring-projects/spring-boot/master/spring-boot-tests/spring-boot-deployment-tests/build/libs/spring-boot-deployment-tests-2.4.0-SNAPSHOT.war,
    /Users/awilkinson/dev/spring-projects/spring-boot/master/spring-boot-tests/spring-boot-deployment-tests/build/libs/spring-boot-deployment-tests-2.3.1.BUILD-SNAPSHOT.war]>
	at sample.DeploymentIntegrationTests$WarDeploymentContainer.findWarToDeploy(DeploymentIntegrationTests.java:146)
	at sample.DeploymentIntegrationTests$WarDeploymentContainer.<init>(DeploymentIntegrationTests.java:138)
	at sample.DeploymentIntegrationTests$WarDeploymentContainer.<init>(DeploymentIntegrationTests.java:135)
	at sample.DeploymentIntegrationTests$DeployedApplication.test(DeploymentIntegrationTests.java:102)
	at sample.DeploymentIntegrationTests$DeployedApplication.access$000(DeploymentIntegrationTests.java:87)
	at sample.DeploymentIntegrationTests.home(DeploymentIntegrationTests.java:52)

IIRC, I recently saw the same between 2.3.0.BUILD-SNAPSHOT and 2.3.1.BUILD-SNAPSHOT as well.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions