@VladimirMikulic noted:
@cesswairimu The line 12 of tag_selection unit test fails.
https://github.com/publiclab/plots2/blob/master/test/unit/tag_selection_test.rb
In the test file, we are doing math with "times". If not done properly, this usually results in unstable tests.
Can we rewrite this test to preserve the functionality, but without "time" hacking?
@Tlazypanda your view on this?
@Tlazypanda noted:
@VladimirMikulic @cesswairimu Umm..going through this found these links might be helpful ...can you check it out? Thanks 鉁岋笍
https://www.greyblake.com/blog/2018-02-19-how-to-fix-intermittent-test-failures/
https://github.com/travisjeffery/timecop
I agree -- let's review this test and see if we can get our Travis tests to more consistently pass!
We'd love help with this!
Hey @jywarren just noting here that I had added the timecop test and it failed on Travis and on research I found out the reason to be :sweat_smile: -
https://github.com/publiclab/plots2/issues/7315#issuecomment-670795021
Might solve this problem for once and for all tagging @VladimirMikulic @Uzay-G
It would help if we knew _exactly_ how to reproduce the issue. Locally the test doesn't fail. So maybe some Travis settings affects it?
Lets keep this open as we monitor #8411 for the the next week or so
Thanks all! Much appreciated!
Noting that this has re-appeared again :facepalm:
`
FAIL["test_graph", #<Minitest::Reporters::Suite:0x000000000762dc28 @name="TagSelectionTest">, 0.4174930689999883]
test_graph#TagSelectionTest (0.42s)
Expected: 16
Actual: 20
test/unit/tag_selection_test.rb:14:in `block in <class:TagSelectionTest>'
321/321: [===============================] 100% Time: 00:00:18, Time: 00:00:18
Keeping this open as we monitor https://github.com/publiclab/plots2/pull/8774 for a while
That fix looks awesome!!
I believe this is actually part of #8865 and should be solved there! Thanks!
Most helpful comment
Hey @jywarren just noting here that I had added the timecop test and it failed on Travis and on research I found out the reason to be :sweat_smile: -
https://github.com/publiclab/plots2/issues/7315#issuecomment-670795021
Might solve this problem for once and for all tagging @VladimirMikulic @Uzay-G