From 0c4e03b99389e35f58a3ffc94862566fe9ce4941 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 17 Oct 2024 16:20:43 -0700 Subject: [PATCH] Revise the tests Signed-off-by: Simeon Widdis --- .../java/org/opensearch/sql/legacy/MalformedQueryIT.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/integ-test/src/test/java/org/opensearch/sql/legacy/MalformedQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/MalformedQueryIT.java index e2419a7d4e..451dd905de 100644 --- a/integ-test/src/test/java/org/opensearch/sql/legacy/MalformedQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/MalformedQueryIT.java @@ -1,9 +1,6 @@ package org.opensearch.sql.legacy; -import static org.opensearch.sql.legacy.TestUtils.performRequest; - import java.io.IOException; -import java.util.Arrays; import java.util.Locale; import org.apache.hc.core5.http.ParseException; import org.apache.hc.core5.http.io.entity.EntityUtils; @@ -33,7 +30,6 @@ public void testJoinWithInvalidCondition() throws IOException, ParseException { TestsConstants.TEST_INDEX_BANK, TestsConstants.TEST_INDEX_BANK_TWO))); var errMsg = new JSONObject(EntityUtils.toString(result.getResponse().getEntity())); - System.err.println("Full response: " + errMsg); Assert.assertEquals("SqlParseException", errMsg.getJSONObject("error").getString("type")); Assert.assertEquals(400, errMsg.getInt("status")); @@ -48,13 +44,13 @@ public void testWildcardInSubquery() throws IOException, ParseException { executeQuery( String.format( Locale.ROOT, - "SELECT a.age FROM %s AS a WHERE a.age IN (SELECT b.age FROM * AS b)", + "SELECT a.first_name FROM %s AS a WHERE a.age IN (SELECT age FROM * WHERE age > 30)", TestsConstants.TEST_INDEX_BANK))); var errMsg = new JSONObject(EntityUtils.toString(result.getResponse().getEntity())); System.err.println("Full response: " + errMsg); Assert.assertEquals( - "IllegalArgumentException", errMsg.getJSONObject("error").getString("type")); + "SqlParseException", errMsg.getJSONObject("error").getString("type")); Assert.assertEquals(400, errMsg.getInt("status")); } }