Test Fix: Update test to properly reflect the Java Timestamp. Fixes #7843

Fixes #7845
This commit is contained in:
Jake Landis 2017-07-29 16:37:38 -05:00
parent 9b4d7c51ae
commit 9d6ecf92ac

View file

@ -10,6 +10,8 @@ require_relative "../support/helpers"
require_relative "../support/matchers"
require 'timeout'
java_import org.logstash.Timestamp
describe LogStash::Agent do
let(:agent_settings) { mock_settings({}) }
let(:agent_args) { {} }
@ -405,11 +407,10 @@ describe LogStash::Agent do
expect(value).to be(nil)
end
#jakelandis - fixed with https://github.com/elastic/logstash/issues/7719
xit "sets the success reload timestamp" do
it "sets the success reload timestamp" do
snapshot = subject.metric.collector.snapshot_metric
value = snapshot.metric_store.get_with_path("/stats/pipelines")[:stats][:pipelines][:main][:reloads][:last_success_timestamp].value
expect(value).to be_a(LogStash::Timestamp)
expect(value).to be_a(Timestamp)
end
it "does not set the last reload error" do
@ -435,11 +436,10 @@ describe LogStash::Agent do
expect(value).to be(nil)
end
#jakelandis - fixed with https://github.com/elastic/logstash/issues/7719
xit "sets the failure reload timestamp" do
it "sets the failure reload timestamp" do
snapshot = subject.metric.collector.snapshot_metric
value = snapshot.metric_store.get_with_path("/stats/pipelines")[:stats][:pipelines][:main][:reloads][:last_failure_timestamp].value
expect(value).to be_a(LogStash::Timestamp)
expect(value).to be_a(Timestamp)
end
it "sets the last reload error" do