-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature/tests timeouts #287
Conversation
469efa4
to
cf191d6
Compare
bce0efb
to
49d4f2b
Compare
d3af0ef
to
b35dbb2
Compare
Let me know if there is no sense in a such wrapping for some tests |
configs/test_local.properties
Outdated
@@ -25,3 +25,5 @@ test.ethereum.gasLimit=6000000 | |||
# --------- Bitcoin --------- | |||
test.bitcoin.walletPath=deploy/bitcoin/test-btc.wallet | |||
test.bitcoin.blockStoragePath=deploy/bitcoin/blocks | |||
# --------- Timeout (minutes) --------- | |||
test.testTimeout=5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can hardcode this value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as a constant value In ConfigHelper
newBalance | ||
) | ||
assertTrue(btcNotaryInitialization.isWatchedAddress(btcAddress)) | ||
assertTimeoutPreemptively(timeoutDuration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need assertTimeoutPreemptively
in every test. Can we use this construction in tests known to be long-running only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use hardcoded testTimeout.
2f9258f
to
64cf7e6
Compare
Please, don't use force push for your branches, since it is impossible to view changes from the last review. |
01668ab
to
f2d9919
Compare
* Wrapped most of integration tests with awkward JUnit5 timeouts
* Wrapped most of integration tests with awkward JUnit5 timeouts
Description of the Change
Added awkward integration tests timeouts.
Details:
junit-team/junit5#80 (comment)
https://blog.philipphauer.de/best-practices-unit-testing-kotlin/
On the one hand it is generally bad idea to use JUnit4 for Kotlin
On the other hand there is no convenient way to implement timeouts in JUnit5 yet
Usage Examples or Tests [optional]