-
Notifications
You must be signed in to change notification settings - Fork 214
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
Technical Debt: Wallet Layer & Network 'listen' testing #115
Conversation
049fddd
to
a8d7c7d
Compare
threadDelay 5000000 | ||
cancel handle | ||
tip <- currentTip <$> unsafeRunExceptT (getWallet wallet wid) | ||
tip `shouldSatisfy` (> SlotId 0 0) |
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.
Nice!
2458611
to
e365b4b
Compare
I fixed missing import error, but tests are failing for me
Ah:
Not sure if we should use different ports, or make sure they are not running at the same time. |
e365b4b
to
0caf1de
Compare
@@ -89,6 +90,7 @@ spec = do | |||
newNetworkLayer = | |||
HttpBridge.newNetworkLayer "testnet" port | |||
startBridge = do | |||
threadDelay 1000000 |
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.
@KtorZ I added this to avoid Address already in use
-problems. Should pass now, but not exactly sure what the problem was.
A failing log: https://travis-ci.org/input-output-hk/cardano-wallet/jobs/510990561
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.
10 seconds is a rather long delay, and I wouldn't expect this to fail even without any delay between two successive runs of the spec.
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.
🤔 ... having a look
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 thought that was 1s 😅
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.
So yeah, it seems that we cancel
from the async
seems to wait for the delivery of the exception, but the socket isn't freed immediately by the OS. I've added a delay of 500ms which should be plenty of time already to free up the socket. I've re-run that 10x in a row without getting any issues 🤔
0caf1de
to
7472df7
Compare
7472df7
to
981fecd
Compare
Issue Number
#94
Overview
Comments