-
Notifications
You must be signed in to change notification settings - Fork 31
chore: improve marketplace integration tests #1268
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
chore: improve marketplace integration tests #1268
Conversation
7afc7bc to
a8af3b4
Compare
a8af3b4 to
b1d2304
Compare
tests/integration/testproofs.nim
Outdated
| marketplacesuite( | ||
| name = "Simulate invalid proofs", | ||
| stopOnRequestFail = false, | ||
| body = block: |
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 you can also write this as:
marketplacesuite("Simulate invalid proofs", stopOnRequestFail=false):
Then you don't need to change the indentation below.
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.
Yes, I already tried but got this error:
Expected one of (first mismatch at [position]):
[3] template marketplacesuite(name: string; body: untyped; stopOnRequestFail = true)
positional param was already given as named param
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.
Yes, the body would need to be the last parameter of marketplacesuite for it to work with the : syntax.
tests/integration/testvalidator.nim
Outdated
| marketplacesuite( | ||
| name = "Validation", | ||
| stopOnRequestFail = false, | ||
| body = block: |
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.
Same here:
marketplacesuite("Validation", stopOnRequestFail = false):
80c0e87 to
2dd760e
Compare
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 need this, ASAP.
…se the poll interval to reduce the number of requests.
2dd760e to
e6da066
Compare
This PR replaces the usage of
check eventuallywith an event subscription mechanism in order to reduce the number of requests sent in our tests and avoid connection timeouts due to overload.Additionally, it introduces
stopOnRequestFail(set to true by default) formarketplacesuite, which will fail the test if a request fails.Finally, it bumps the contracts to use the latest version of Hardhat.