-
Notifications
You must be signed in to change notification settings - Fork 711
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
Reinstate pool tests #3486
Reinstate pool tests #3486
Conversation
Ben-PH
commented
Feb 1, 2023
•
edited
Loading
edited
- document all added functions
- try in sandbox /simulation/labnet
- unit tests on the added/changed features
- make tests compile
- make tests pass
- add logs allowing easy debugging in case the changes caused problems
- if the API has changed, update the API specification
still need to refactor EDIT: might not end up using it... |
67d2921 adds some (will get through a few threads from time to time...)
Still need to work out the source of the problem... |
67d2921
to
a3fb651
Compare
At this point, two of the methods are unignored, but the third one is not clear for me yet. @AurelienFT what do you think of merging these two so far, and do the rest in a follow up PR. It at least makes these two available in the meantime. |
I think it comes down to the balance comparison
Turns out needed to forward on the messages, and provide a balance that allowed the operations to occur. Still has an issue with storage cleanup. |
test is flakey: run this inside
|
I didn't follow well everything that has been going on but to give you maybe some context that might help you. We always run the test at root with feature testing (to have exports only when test cfg (no other way with cargo yet)). |
updated script: COUNTER = 0;
while cargo test test_pool -F testing --release ; do
COUNTER=$[$COUNTER +1]
:
done
echo $COUNTER; @Eitu33 had a look at it with me, and it seems that this comes down to concurrent nature of the way the tests are setup? The means to fix it is similar to the other two tests: Use the mock-receiver to intercept requests for data, and reply with hardcoded/intercepted data. With that in mind, I'll do the final tidy up then mark for review. |
@@ -189,7 +212,7 @@ fn test_pool() { | |||
let fee = 1000; | |||
let expire_period: u64 = 300; | |||
let op = get_transaction(expire_period, fee); | |||
let mut storage = Storage::create_root(); | |||
let mut storage = storage_base.clone_without_refs(); |
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.
Was it the case in the past that you could create multiple instances of storage without panic!
ing? That could explain the need for this change.