sablier-labs / v1-protocol

Core smart contracts of the Sablier V1 protocol
https://sablier.finance
GNU General Public License v3.0
263 stars 78 forks source link

Fixed return() in test failing #6

Closed ghost closed 5 years ago

ghost commented 5 years ago

I was running yarn coverage and tests failed. Found a typo in a test and fixed it.

Screenshot from 2019-08-29 18-06-47

PaulRBerg commented 5 years ago

Hey @brittoip thanks for the PR.

Unfortunately, that's not a typo. It's a known problem with the current tests, they sometimes fail due to time-related issues. Specifically, the testing javascript codes takes some time to execute itself, and this time is hard if not outright to predict precisely.

Therefore, what has to be done is be more tolerant with the time. Currently, the satisfy function only accept a 1 second slippage. That should be way higher, smth around 14 seconds (average time between blocks on Ethereum).