#8341 raise tolerance in timestamp_spec.rb tests

Fixes #8342
This commit is contained in:
Armin 2017-09-20 19:00:52 +02:00 committed by Armin Braun
parent a087cc40e8
commit cdfd1d056a

View file

@ -13,10 +13,10 @@ describe LogStash::Timestamp do
# we may need to use `be_within(0.000999999).of()` in other places too
it "should work" do
t = LogStash::Timestamp.new
expect(t.time.to_i).to be_within(1).of Time.now.to_i
expect(t.time.to_i).to be_within(2).of Time.now.to_i
t = LogStash::Timestamp.now
expect(t.time.to_i).to be_within(1).of Time.now.to_i
expect(t.time.to_i).to be_within(2).of Time.now.to_i
now = DateTime.now.to_time.utc
t = LogStash::Timestamp.new(now)