Skip to content

Commit bdf25b0

Browse files
Refactor
1 parent 0c52529 commit bdf25b0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,13 +3230,14 @@ public void testInvalidPatternsWithIntermittentQuotes() {
32303230
var randomInvalidChar = randomFrom(invalidChars);
32313231

32323232
// Construct the new invalid index pattern.
3233-
var remoteIndexWithInvalidChar = quote(randomIdentifier() + ":" + "foo" + randomInvalidChar + "bar");
3233+
var invalidIndexName = "foo" + randomInvalidChar + "bar";
3234+
var remoteIndexWithInvalidChar = quote(randomIdentifier() + ":" + invalidIndexName);
32343235
var query = "FROM " + randomIndex + "," + remoteIndexWithInvalidChar;
32353236
expectError(
32363237
query,
3237-
"Invalid index name [foo"
3238-
+ randomInvalidChar
3239-
+ "bar], must not contain the following characters [' ','\"',',','/','<','>','?','\\','|']"
3238+
"Invalid index name ["
3239+
+ invalidIndexName
3240+
+ "], must not contain the following characters [' ','\"',',','/','<','>','?','\\','|']"
32403241
);
32413242
}
32423243

0 commit comments

Comments
 (0)