-
Notifications
You must be signed in to change notification settings - Fork 431
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
E2E testing: Make node_log_contains
more robust
#1423
Comments
The proper solution would be to have each E2E Not particularly fond of this solution, as it would have much more overhead than the current solution of just running one node for all the tests. If projects have a more complex node setup (e.g relay chain + parachain), spawning it for every test is quite inefficient. |
I don't see a proper solution for this that doesn't lead to bugs in tests due to ambivalence in behavior of We could execute tests in a sequential order as soon as
It'll be hard to make sure that users are aware of this distinct behavior and I think it'll rather lead to confusion and bugs in tests. I think the best course forward is to close this issue and remove the existing functionality. The better alternative is to throw an event and detect the emission of that in the test. It's also possible to throw events only for contracts not compiled in release mode by adding a |
Was this feature primarily to detect |
Yes that's possible and we're already doing that for an E2E test in |
Follow-up to #1395.
The E2E testing framework contains a function
node_log_contains
that basically does a full text search on a node log:The issue with this function is that it returns
true
as soon as the supplied String is found in the log file. This is a bit unfortunate, if one executes multiple tests in parallel (ascargo test
does by default) then it could be thatBoth tests would show up as succeed though, as Test B still finds the String in the log currently.
I don't have a good idea how to fix this yet, maybe someone else has?
The text was updated successfully, but these errors were encountered: