-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Closed
Description
When building v3.5.0 under WSL (Ubuntu 20.04), the following test fails:
./gradlew :spring-boot-project:spring-boot:test --tests "org.springframework.boot.context.properties.ConfigurationPropertiesTests.loadWhenBindingWithParentContextShouldBind"
The failure occurs in this call chain:
loadWhenBindingWithParentContextShouldBind
-> load(new Class<?>[] { BasicConfiguration.class, BasicPropertiesConsumer.class }, "name=child")
-> this.context.refresh()
-> obtainFreshBeanFactory()
-> refreshBeanFactory()
-> !this.refreshed.compareAndSet(false, true) == true
However, this test passes successfully in:
- Windows 11
- Ubuntu 22.04
Please help investigate why it fails specifically in WSL on Ubuntu 20.04.
Metadata
Metadata
Assignees
Labels
type: taskA general taskA general task
Type
Projects
Relationships
Development
Select code repository
Activity
philwebb commentedon Jun 10, 2025
What's the actual failure you're seeing? Can you provide any stack trace and log output.
LinkDownZ commentedon Jun 10, 2025
wilkinsona commentedon Jun 10, 2025
I can't see where
orange
would come from, particularly when running that one test in isolation. My best guess is that your WSL environment has an environment variable namedNAME
with the valueorange
that's affecting the test.vpavic commentedon Jun 11, 2025
A few years ago I played with building Spring Boot under WSL and reported similar issues, see:
With environment variables like
NAME
it's somewhat likely to run into conflicts in some environments so I think it would be wise to avoid such generic names.LinkDownZ commentedon Jun 11, 2025
The value of the
NAME
variable is indeed the same as the Windows hostname, and the compilation can temporarily succeed by usingunset NAME
.15 remaining items