Closed Dominik1999 closed 4 years ago
This is not only a problem for the SP, but also for other Raiden API users. So it would be great of there was a general approach how to deal with such sychronization problems.
also for other Raiden API users
can you give an example?
potential option for synchronization:
But, the overall question is whether we want to bloat the codebase with synchronization for testing.
Check if we can use retry logic instead of a static wait
I checked some scenarios and most waits are in front of assertions. This leds to my proposed solution of making all assertions retryable in order to be able to remove the forced sync wait and most of the waits in scenarios as well.
With this approach we'll not be able to get rid of all wait tasks, but I think it's a good compromise between being fast in the happy case and not having to put too much manual work in scenarios.
In https://github.com/raiden-network/scenario-player/pull/453 I moved the retry logic to the base Task
class, with retries being disabled there. The logic is only enabled for assert
-style tasks like AssertBlockchainEventsTask
, AssertPFS*Task
s and Assert*Task
s.
Sounds very reasonable. I think we should try it out.
Scenarios take 4 times longer than before
After https://github.com/raiden-network/scenario-player/pull/563 some scenarios, e.g. bf1, take 4 times longer than before, now >4h.
On the other hand, those scenarios seem to be less flaky.
Can we relax the 30s wait?
Investigate whether we can relax the 30s wait to decrease the run time of those scenarios.
Conclusion of possible reduction and implementation
This is issue is considered to be done, when there is a well-founded conclusion whether we can reduce the time of the scenario runs or not.
If we can, then the implementation is part of this issue.