-
Notifications
You must be signed in to change notification settings - Fork 38
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(tests): submit_withdrawal_request random failure #774
fix(tests): submit_withdrawal_request random failure #774
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
if !is_in_queue { | ||
chain.produce_block(vec![], vec![withdrawal]).await.unwrap(); | ||
} else { | ||
chain.produce_block(vec![], vec![]).await.unwrap(); |
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.
What if the withdrawal request remains in the queue for a while? The mem pool state subsequently loaded won't include it, right?
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.
Maybe. By default produce_block
fn will refresh mem pool, it will be included if it's pushed to mem pool. (aka produce_block
fail to acquire lock)
Add new produce_block_and_refresh_mem_pool
to allow skip refresh mem pool.
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.
My point is that this test is not waiting for the withdrawal to be actually pushed to the mem pool.
I think it should poll until the request is not in queue.
The latest commit still fails if I add a sleep before locking mem pool in line 602 in registry.rs
.
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.
Indeed. Fixed.
This comment was marked as outdated.
This comment was marked as outdated.
3d54888
to
9e87fe0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
9e87fe0
to
47ea1f3
Compare
Running integration testWorkflow Run Id: 2753361099 Components:
Manually running integration testPost a comment contains
Note:
Run Resultsuccess |
Withdrawal request is pushed to mem pool immediately
https://github.com/nervosnetwork/godwoken/runs/7533962286?check_suite_focus=true#step:9:741
In this case, poll withdrawal until it's pushed to mem pool.