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

Fix TimeoutCancellationException - downgrade Spek #1903

Merged
merged 1 commit into from
Sep 8, 2019
Merged

Fix TimeoutCancellationException - downgrade Spek #1903

merged 1 commit into from
Sep 8, 2019

Conversation

schalkms
Copy link
Member

@schalkms schalkms commented Sep 8, 2019

Spek 2.0.3 introduced test timeouts.
(https://github.com/spekframework/spek/releases/tag/2.0.3)

The default timeout is 10 seconds per test case.
Detekt's rule-tests easily reach this limit when

  1. setting up 8 KotlinScriptEngine's for compiling test snippets.
  2. the (CI) machines are under heavy load

This results in the following exception as happened in commit 9691e0d.
kotlinx.coroutines.TimeoutCancellationException:
Timed out waiting for 10000 ms

Unfortunately, Spek doesn't allow to set a global timeout (yet).
See: spekframework/spek#769
Setting a custom timeout on each test block is not what we want.
Therefore, this commit downgrades Spek to version 2.0.2.

Spek 2.0.3 introduced test timeouts.
(https://github.com/spekframework/spek/releases/tag/2.0.3)

The default timeout is 10 seconds per test case.
Detekt's rule-tests easily reach this limit when

1. setting up 8 `KotlinScriptEngine's` for compiling test snippets.
2. the (CI) machines are under heavy load

This results in the following exception as happened in commit 9691e0d.
kotlinx.coroutines.TimeoutCancellationException: 
Timed out waiting for 10000 ms

Unfortunately, Spek doesn't allow to set a global timeout (yet).
See: spekframework/spek#769
Setting a custom timeout on each test block is not what we want.
Therefore, this commit downgrades Spek to version 2.0.2.
@3flex 3flex merged commit 76c2bd2 into detekt:master Sep 8, 2019
@codecov-io
Copy link

codecov-io commented Sep 8, 2019

Codecov Report

Merging #1903 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1903   +/-   ##
=========================================
  Coverage     80.43%   80.43%           
  Complexity     1950     1950           
=========================================
  Files           325      325           
  Lines          5490     5490           
  Branches       1013     1013           
=========================================
  Hits           4416     4416           
  Misses          545      545           
  Partials        529      529

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9691e0d...8d434b9. Read the comment docs.

@arturbosch
Copy link
Member

arturbosch commented Sep 12, 2019

Ah I see, sorry for the spam in both PRs :)
Edit: just found System.setProperty("SPEK_TIMEOUT", 20000L.toString()) in their codebase

@arturbosch arturbosch added this to the 1.0.2 milestone Sep 12, 2019
sowmyav24 pushed a commit to sowmyav24/detekt that referenced this pull request Sep 17, 2019
Spek 2.0.3 introduced test timeouts.
(https://github.com/spekframework/spek/releases/tag/2.0.3)

The default timeout is 10 seconds per test case.
Detekt's rule-tests easily reach this limit when

1. setting up 8 `KotlinScriptEngine's` for compiling test snippets.
2. the (CI) machines are under heavy load

This results in the following exception as happened in commit 9691e0d.
kotlinx.coroutines.TimeoutCancellationException: 
Timed out waiting for 10000 ms

Unfortunately, Spek doesn't allow to set a global timeout (yet).
See: spekframework/spek#769
Setting a custom timeout on each test block is not what we want.
Therefore, this commit downgrades Spek to version 2.0.2.
sowmyav24 pushed a commit to sowmyav24/detekt that referenced this pull request Sep 17, 2019
Spek 2.0.3 introduced test timeouts.
(https://github.com/spekframework/spek/releases/tag/2.0.3)

The default timeout is 10 seconds per test case.
Detekt's rule-tests easily reach this limit when

1. setting up 8 `KotlinScriptEngine's` for compiling test snippets.
2. the (CI) machines are under heavy load

This results in the following exception as happened in commit 9691e0d.
kotlinx.coroutines.TimeoutCancellationException: 
Timed out waiting for 10000 ms

Unfortunately, Spek doesn't allow to set a global timeout (yet).
See: spekframework/spek#769
Setting a custom timeout on each test block is not what we want.
Therefore, this commit downgrades Spek to version 2.0.2.
@arturbosch arturbosch modified the milestones: 1.0.2, 1.1.0 Sep 17, 2019
@schalkms schalkms deleted the timeout-spek branch November 8, 2019 18:17
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
Spek 2.0.3 introduced test timeouts.
(https://github.com/spekframework/spek/releases/tag/2.0.3)

The default timeout is 10 seconds per test case.
Detekt's rule-tests easily reach this limit when

1. setting up 8 `KotlinScriptEngine's` for compiling test snippets.
2. the (CI) machines are under heavy load

This results in the following exception as happened in commit 9691e0d.
kotlinx.coroutines.TimeoutCancellationException: 
Timed out waiting for 10000 ms

Unfortunately, Spek doesn't allow to set a global timeout (yet).
See: spekframework/spek#769
Setting a custom timeout on each test block is not what we want.
Therefore, this commit downgrades Spek to version 2.0.2.
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
Spek 2.0.3 introduced test timeouts.
(https://github.com/spekframework/spek/releases/tag/2.0.3)

The default timeout is 10 seconds per test case.
Detekt's rule-tests easily reach this limit when

1. setting up 8 `KotlinScriptEngine's` for compiling test snippets.
2. the (CI) machines are under heavy load

This results in the following exception as happened in commit 9691e0d.
kotlinx.coroutines.TimeoutCancellationException: 
Timed out waiting for 10000 ms

Unfortunately, Spek doesn't allow to set a global timeout (yet).
See: spekframework/spek#769
Setting a custom timeout on each test block is not what we want.
Therefore, this commit downgrades Spek to version 2.0.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants