From 2b4beff48213067140886d2e212443f6ddb0d121 Mon Sep 17 00:00:00 2001 From: kkewwei Date: Sun, 7 Apr 2024 10:09:21 +0800 Subject: [PATCH] add changelog --- CHANGELOG.md | 1 + .../core/common/io/stream/FilterStreamInputTests.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd9db0e2213c1..e23fd0874b722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Fix bulk API ignores ingest pipeline for upsert ([#12883](https://github.com/opensearch-project/OpenSearch/pull/12883)) - Fix issue with feature flags where default value may not be honored ([#12849](https://github.com/opensearch-project/OpenSearch/pull/12849)) +- Fix implement mark() and markSupported() in class FilterStreamInput ([#13098](https://github.com/opensearch-project/OpenSearch/pull/13098)) ### Security diff --git a/libs/core/src/test/java/org/opensearch/core/common/io/stream/FilterStreamInputTests.java b/libs/core/src/test/java/org/opensearch/core/common/io/stream/FilterStreamInputTests.java index cb3ccb217af30..ab6dfbc2feb25 100644 --- a/libs/core/src/test/java/org/opensearch/core/common/io/stream/FilterStreamInputTests.java +++ b/libs/core/src/test/java/org/opensearch/core/common/io/stream/FilterStreamInputTests.java @@ -14,6 +14,8 @@ import java.io.IOException; import java.nio.ByteBuffer; +import static org.hamcrest.Matchers.is; + /** test the FilterStreamInput using the same BaseStreamTests */ public class FilterStreamInputTests extends BaseStreamTests { @Override @@ -34,6 +36,7 @@ public void testMarkAndReset() throws IOException { BytesReference bytesReference = BytesReference.fromByteBuffer(buffer); StreamInput streamInput = filterStreamInputTests.getStreamInput(bytesReference); streamInput.read(); + assertThat(streamInput.markSupported(), is(true)); streamInput.mark(-1); int int1 = streamInput.read(); int int2 = streamInput.read();