(core) After a spate of spurious test failures, try to fix a few.

Summary:
- Disable a pointless timing check in Python that occasionally fails.
- Make the test of InvalidValues more robust by waiting for calculated values to load.
- Make Snapshots test more robust by waiting for an action that precedes a URL change.

Test Plan: These tests should fail less often when the tested logic is correct.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2609
This commit is contained in:
Dmitry S 2020-09-12 00:00:55 -04:00
parent 003029bf8a
commit 2ea8b8d71f

View File

@ -139,7 +139,7 @@ m4 = t.MatchCounterIntersection(t.sample)
t4 = min(timeit.repeat(stmt='m4.count_unique(t.data3)', setup=setup, number=N, repeat=3)) / N t4 = min(timeit.repeat(stmt='m4.count_unique(t.data3)', setup=setup, number=N, repeat=3)) / N
#print "Timings/iter data3: %.3fus %.3fus %.3fus %.3fus" % (t1 * 1e6, t2 * 1e6, t3*1e6, t4*1e6) #print "Timings/iter data3: %.3fus %.3fus %.3fus %.3fus" % (t1 * 1e6, t2 * 1e6, t3*1e6, t4*1e6)
self.assertLess(t1, t2) self.assertLess(t1, t2)
self.assertLess(t1, t3) #self.assertLess(t1, t3) # This fails on occasion, but it's a fairly pointless check.
self.assertLess(t1, t4) self.assertLess(t1, t4)