File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -778,21 +778,24 @@ public void testErrorMessageForMissingParams() throws IOException {
778778 ResponseException .class ,
779779 () -> runEsql (requestObjectBuilder ().query ("from idx | where x == ?n1" ).params ("[]" ))
780780 );
781- assertThat (EntityUtils .toString (re .getResponse ().getEntity ()), containsString ("line 1:23: Unknown query parameter [n1]" ));
781+ assertThat (
782+ EntityUtils .toString (re .getResponse ().getEntity ()).replaceAll ("\\ \\ \n \s +\\ \\ " , "" ),
783+ containsString ("line 1:23: Unknown query parameter [n1]" )
784+ );
782785
783786 re = expectThrows (
784787 ResponseException .class ,
785788 () -> runEsql (requestObjectBuilder ().query ("from idx | where x == ?n1 and y == ?n2" ).params ("[{\" n\" : \" v\" }]" ))
786789 );
787- assertThat (EntityUtils .toString (re .getResponse ().getEntity ()), containsString ("""
790+ assertThat (EntityUtils .toString (re .getResponse ().getEntity ()). replaceAll ( " \\ \\ \n \s + \\ \\ " , "" ) , containsString ("""
788791 line 1:23: Unknown query parameter [n1], did you mean [n]?; line 1:36: Unknown query parameter [n2], did you mean [n]?""" ));
789792
790793 re = expectThrows (
791794 ResponseException .class ,
792795 () -> runEsql (requestObjectBuilder ().query ("from idx | where x == ?n1 and y == ?n2" ).params ("[{\" n1\" : \" v1\" }]" ))
793796 );
794797 assertThat (
795- EntityUtils .toString (re .getResponse ().getEntity ()),
798+ EntityUtils .toString (re .getResponse ().getEntity ()). replaceAll ( " \\ \\ \n \s + \\ \\ " , "" ) ,
796799 containsString ("line 1:36: Unknown query parameter [n2], did you mean [n1]" )
797800 );
798801 }
You can’t perform that action at this time.
0 commit comments