Add a test to make sure the Collector#snapshot_metric returns a cloned metric store.

Fixes #6456
This commit is contained in:
Pier-Hugues Pellerin 2016-12-21 15:51:48 -05:00
parent 52b6f963e1
commit 7b4373789f

View file

@ -45,5 +45,9 @@ describe LogStash::Instrument::Collector do
it "return a `LogStash::Instrument::MetricStore`" do
expect(subject.snapshot_metric).to be_kind_of(LogStash::Instrument::Snapshot)
end
it "returns a clone of the metric store" do
expect(subject.snapshot_metric).not_to eq(subject.snapshot_metric)
end
end
end