You can also use this config in your application.yml file, if you have many test classes and need the timeout to be applied on all of them.
spring: test: webtestclient: timeout: 50000ms