Skip to content

Commit

Permalink
backporting from 2.x (opensearch-project#2182)
Browse files Browse the repository at this point in the history
Signed-off-by: Dhrubo Saha <[email protected]>
  • Loading branch information
dhrubo-os authored and austintlee committed Mar 18, 2024
1 parent 6639ecb commit 312444e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.opensearch.common.xcontent.LoggingDeprecationHandler;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.xcontent.MediaTypeRegistry;
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.core.xcontent.NamedXContentRegistry;
import org.opensearch.core.xcontent.ToXContent;
import org.opensearch.core.xcontent.XContentBuilder;
Expand Down Expand Up @@ -145,7 +145,7 @@ public void constructorMLCreateConnectorInput_NullProtocol() {

@Test
public void testToXContent_FullFields() throws Exception {
XContentBuilder builder = MediaTypeRegistry.contentBuilder(XContentType.JSON);
XContentBuilder builder = XContentFactory.jsonBuilder();
mlCreateConnectorInput.toXContent(builder, ToXContent.EMPTY_PARAMS);
assertNotNull(builder);
String jsonStr = builder.toString();
Expand All @@ -154,7 +154,7 @@ public void testToXContent_FullFields() throws Exception {

@Test
public void testToXContent_NullFields() throws Exception {
XContentBuilder builder = MediaTypeRegistry.contentBuilder(XContentType.JSON);
XContentBuilder builder = XContentFactory.jsonBuilder();
mlCreateDryRunConnectorInput.toXContent(builder, ToXContent.EMPTY_PARAMS);
assertNotNull(builder);
String jsonStr = builder.toString();
Expand Down

0 comments on commit 312444e

Please sign in to comment.