Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure default timeout of 15 minutes for all testable and lifecycle methods #2550

Merged
merged 1 commit into from
Oct 31, 2021

Conversation

wborn
Copy link
Member

@wborn wborn commented Oct 30, 2021

This helps to identify what tests cause builds to fail and it will more quickly end builds.

For instance the WebClientFactoryImplTest currently often hangs on my local builds.
With this configuration in place it is easy to see and it will timeout after 15 minutes:

[ERROR] Tests run: 5, Failures: 0, Errors: 1, Skipped: 4, Time elapsed: 900.207 s <<< FAILURE! - in org.openhab.core.io.net.http.internal.WebClientFactoryImplTest
[ERROR] org.openhab.core.io.net.http.internal.WebClientFactoryImplTest.testGetClients  Time elapsed: 900.194 s  <<< ERROR!
java.util.concurrent.TimeoutException: tearDown() timed out after 15 minutes

See: https://junit.org/junit5/docs/current/user-guide/#writing-tests-declarative-timeouts

…e methods

This helps to identify what tests cause builds to fail and it will more quickly end builds.

For instance the WebClientFactoryImplTest currently often hangs on my local builds.
With this configuration in place it is easy to see and it will timeout after 15 minutes:

[ERROR] Tests run: 5, Failures: 0, Errors: 1, Skipped: 4, Time elapsed: 900.207 s <<< FAILURE! - in org.openhab.core.io.net.http.internal.WebClientFactoryImplTest
[ERROR] org.openhab.core.io.net.http.internal.WebClientFactoryImplTest.testGetClients  Time elapsed: 900.194 s  <<< ERROR!
java.util.concurrent.TimeoutException: tearDown() timed out after 15 minutes

See: https://junit.org/junit5/docs/current/user-guide/#writing-tests-declarative-timeouts

Signed-off-by: Wouter Born <github@maindrain.net>
@wborn wborn added the test label Oct 30, 2021
@wborn wborn requested a review from a team as a code owner October 30, 2021 16:50
Copy link
Contributor

@cweitkamp cweitkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Let's give it a try.

@cweitkamp cweitkamp merged commit 1db273e into openhab:main Oct 31, 2021
@cweitkamp cweitkamp added this to the 3.2 milestone Oct 31, 2021
@wborn wborn deleted the test-timeout branch October 31, 2021 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants