Document spring.test.webtestclient.timeout
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:windows-latest name:Windows]) (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:24], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:24], map[id:windows-latest name:Windows]) (push) Has been cancelled Details
Run CodeQL Analysis / run-analysis (push) Has been cancelled Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Has been cancelled Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Has been cancelled Details
Build and Deploy Snapshot / Trigger Docs Build (push) Has been cancelled Details
Build and Deploy Snapshot / Verify (push) Has been cancelled Details

Closes gh-46577
This commit is contained in:
Stéphane Nicoll 2025-07-29 12:04:17 +02:00
parent 4f875ad39b
commit 1e5afaf35c
2 changed files with 14 additions and 0 deletions

View File

@ -11,6 +11,12 @@
"type": "java.lang.Boolean", "type": "java.lang.Boolean",
"description": "Whether observability should be auto-configured in tests.", "description": "Whether observability should be auto-configured in tests.",
"defaultValue": false "defaultValue": false
},
{
"name": "spring.test.webtestclient.timeout",
"type": "java.time.Duration",
"description": "Maximum amount of time to wait for responses.",
"defaultValue": "5s"
} }
] ]
} }

View File

@ -69,6 +69,14 @@ class WebTestClientAutoConfigurationTests {
}); });
} }
@Test
void shouldHaveConsistentDefaultTimeout() {
this.contextRunner.withUserConfiguration(BaseConfiguration.class).run((context) -> {
WebTestClient webTestClient = context.getBean(WebTestClient.class);
assertThat(webTestClient).hasFieldOrPropertyWithValue("responseTimeout", Duration.ofSeconds(5));
});
}
@Test @Test
void shouldCustomizeTimeout() { void shouldCustomizeTimeout() {
this.contextRunner.withUserConfiguration(BaseConfiguration.class) this.contextRunner.withUserConfiguration(BaseConfiguration.class)