From e1dc90318091cb28f5472c078116862c9105de19 Mon Sep 17 00:00:00 2001 From: Rob Bavey Date: Mon, 18 Oct 2021 14:36:45 -0400 Subject: [PATCH] Fix broken identity map flush test Following https://github.com/logstash-plugins/logstash-codec-multiline/pull/70, clones of the codec are used, rather than the original codec, causing the codec tracer not to be able to trace events that occurred after the clone. This commit removes the physical clone on the CodecTracer, rather treating it as another function to be traced, returning the same Tracer instance, but adding a clone event instead. --- spec/helpers/spec_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/helpers/spec_helper.rb b/spec/helpers/spec_helper.rb index b2f0ddd6..c9419988 100644 --- a/spec/helpers/spec_helper.rb +++ b/spec/helpers/spec_helper.rb @@ -57,7 +57,8 @@ def close @tracer.push [:close, true] end def clone - self.class.new + @tracer.push [:clone, true] + self end end end