You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.
Several subprojects have a custom :be_time RSpec matcher for comparing times. Currently this is string-based and compares down to 1/100 second. This is generally loose enough on the desktop but causes intermittent failures on Travis, e.g. this one in build 581:
1) StashEngine::Resource update_publication_date! falls back to the current time
Failure/Error: expect(resource.publication_date).to be_time(Time.now)
expected time:
2018-11-14T17:55:17.98Z
but was:
2018-11-14T17:55:17.97Z
# ./spec/db/stash_engine/resource_spec.rb:172:in `block (3 levels) in <module:StashEngine>'
Finished in 6.71 seconds (files took 1.51 seconds to load)
247 examples, 1 failure
A fix would be to replace the string-based matcher with one based on (1) timezone offset and (2) fractional seconds, with a sloppier delta, such as the one used in mrt-dashboard, which only checks accuracy within a half-second either way.
(Note though that the mrt-dashboard matcher is only used by a couple of tests, and using it globally in stash might reveal some bugs.)
For stash, this would have to be substituted in five files:
(At some point it might be worth pulling out the custom matchers into a shared file, either as a standalone gem or just a directory with symlinks. Note that they're not all quite the same and some may be newer or more fully-featured than others.)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Several subprojects have a custom
:be_time
RSpec matcher for comparing times. Currently this is string-based and compares down to 1/100 second. This is generally loose enough on the desktop but causes intermittent failures on Travis, e.g. this one in build 581:A fix would be to replace the string-based matcher with one based on (1) timezone offset and (2) fractional seconds, with a sloppier delta, such as the one used in
mrt-dashboard
, which only checks accuracy within a half-second either way.(Note though that the
mrt-dashboard
matcher is only used by a couple of tests, and using it globally instash
might reveal some bugs.)For
stash
, this would have to be substituted in five files:(At some point it might be worth pulling out the custom matchers into a shared file, either as a standalone gem or just a directory with symlinks. Note that they're not all quite the same and some may be newer or more fully-featured than others.)
The text was updated successfully, but these errors were encountered: