#8341 raise tolerance in timestamp_spec.rb tests

Fixes #8342

Fixes #8346
This commit is contained in:
Armin 2017-09-20 19:00:52 +02:00 committed by Jake Landis
parent e03b25bf94
commit 6ef8427eb2

View file

@ -7,10 +7,10 @@ describe LogStash::Timestamp do
context "constructors" do
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 = Time.now.utc
t = LogStash::Timestamp.new(now)