lib/fluent/test/output_test.rb in fluentd-0.14.1 vs lib/fluent/test/output_test.rb in fluentd-0.14.2
- old
+ new
@@ -82,13 +82,13 @@
if @expected_buffer
assert_equal(@expected_buffer, buffer)
end
chunk = if @instance.instance_eval{ @chunk_key_tag }
- @instance.buffer.generate_chunk(@instance.metadata(@tag, nil, nil))
+ @instance.buffer.generate_chunk(@instance.metadata(@tag, nil, nil)).staged!
else
- @instance.buffer.generate_chunk(@instance.metadata(nil, nil, nil))
+ @instance.buffer.generate_chunk(@instance.metadata(nil, nil, nil)).staged!
end
chunk.concat(buffer, es.size)
begin
result = @instance.write(chunk)
@@ -138,10 +138,10 @@
if @expected_buffer
assert_equal(@expected_buffer, buffer)
end
lines.keys.each do |meta|
- chunk = @instance.buffer.generate_chunk(meta)
+ chunk = @instance.buffer.generate_chunk(meta).staged!
chunk.append(lines[meta])
begin
result.push(@instance.write(chunk))
ensure
chunk.purge