Closed AM5800 closed 5 years ago
Regardless of the change, is this test a functional scenario? I can imagine that the previous version of the test was a sort of performance test, and, in my opinion, it could go to the cron job with an increased number of transactions.
What the function does the proposed version of the test check? Is 0.5sec a value we declare, rely on, and advertising? Frankly, this PR looks like a try to fit in specific Travis configuration.
I do not see how this test can be a functional in any version. Personally, I'd remove it from functional tests and run on a cron job. And I'm a bit unhappy having proposed version in any form.
We have functionality that there is no propagation delay for finalizer commits and this test shows it. We can question if we need this test. My opinion is we should keep it but will be up to other opinions.
We used to run it on cron but then we kept breaking it and noticed it only after the PR was merged. Was quite annoying for the team so we decided to run it on every Travis build. I'd suggest to keep it in the test list and don't move to cron.
I agree with @kostyantyn . I would also like to add, that if we run previous version of this test, let's say, 2000 times - we will get 2(5) seconds mean for regular transactions. I am not sure we really need such comparison because we already know the result (but yes, we could have a test which ensures that diffusion works - but isn't it a different story?)
I would also like to add, that if we run previous version of this test, let's say, 2000 times - we will get 2(5) seconds mean for regular transactions. I am not sure we really need such comparison because we already know the result (but yes, we could have a test which ensures that diffusion works - but isn't it a different story?)
It's a purpose of performance tests to show same numbers and their correlation, actually. Anyway it's neither NACK nor ACK, just my 2 cents.
we could have a test which ensures that diffusion works
Although this might be a different story, we should have such a test. I can guarantee you things will break, for example when merging with bitcoin 0.17. 0.18. Anything.
This is another take on #875
Let me remind you how it all began:
full log
Our intent is to assert that votes are propagated faster than regular transactions. Previous approach was comparing them directly. But it ended up very unstable - sometimes diffusion contribution was very small, sometimes huge. The only right solution to make this stable - is to increase number of transactions we take into account. Current value(5) is just too small. But each extra transaction dramatically increases test running time.
So together with @kostyantyn we decided to take another path: We know that regular transactions are propagated with mean delay of 2(or 5) seconds. So we just assert that votes are faster than that. I've launched this test several times and the slowest vote I have seen on travis took 0.23 seconds. So I set threshold to 0.5 seconds.
This resulted in a much simpler test. And much faster one
Signed-off-by: Aleksandr Mikhailov aleksandr@thirdhash.com