-
Notifications
You must be signed in to change notification settings - Fork 27
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
contracts: fix intermittent failures in auth.ts tests #375
Conversation
✅ Deploy Preview for oasisprotocol-sapphire-paratime canceled.
|
34e196f
to
0a81358
Compare
Well... F... This is still running into the problem! We're waiting for bearer token to expire, push a transaction through... And it still thinks the bearer token is valid?
|
@matevz Any idea why this test is still failing intermittently? |
I tried repeating the test I tried double I tried |
https://github.com/oasisprotocol/sapphire-paratime/actions/runs/10692954396/job/29642295984 sapphire-paratime/contracts/test/subcall.ts Lines 318 to 320 in 58be8a6
(I tried repeating it 20 times but it just started failing differently after 10th success 🤷 https://github.com/oasisprotocol/sapphire-paratime/actions/runs/10694614566/job/29646662356 ) |
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 catch, thanks.
|
49b483d
to
bd482a3
Compare
So, even if I wait for the tx receipt from Ohh.. I know why, because block timestamps are in seconds, we're waiting less than a second. If I change it to wait at least 1 second then rounding won't cause it to succeed when it should fail. |
20840a9
to
206a431
Compare
So to summarize:
Have now run this locally 20 times in a row with no failures. Yet CI failed again... Will revisit this tomorrow or Friday. For now we can continue re-running failed CI tests if we encounter this bug. |
Interesting. Maybe the new block wasn't propagated yet to the oasis web3 gw (and postgres db) and it used the old block number when performing the query. Did you try adding sleep after waiting for the receipt and before making a query? |
I'll add in more debugging to check:
|
206a431
to
bb26a85
Compare
bb26a85
to
a4beb2a
Compare
…edarMist/auth-intermittent-failure contracts: fix intermittent failures in auth.ts tests 825c8ef
fixes: #361
Also fixes typescript warnings in auth.ts