Skip to content

Commit 836d9a0

Browse files
authored
Merge branch '9.1' into unmute/9.1/glob-test
2 parents 7311635 + 0d9b517 commit 836d9a0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

libs/core/src/test/java/org/elasticsearch/core/GlobTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ public void testSuffixMatch() {
9696
var pattern = "*" + suffix;
9797
assertMatch(pattern, suffix);
9898
assertMatch(pattern, randomAsciiString(randomIntBetween(1, 30)) + suffix);
99-
assertNonMatch(pattern, suffix + "#" + randomValueOtherThan(suffix, () -> randomAsciiString(randomIntBetween(1, 30))));
99+
assertNonMatch(
100+
pattern,
101+
randomValueOtherThanMany(str -> str.endsWith(suffix), () -> suffix + "#" + randomAsciiString(randomIntBetween(1, 30)))
102+
);
100103
assertNonMatch(pattern, suffix.substring(0, suffix.length() - 1));
101104
assertNonMatch(pattern, suffix.substring(1));
102105
}

x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/RemoteClusterSecurityEsqlIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,18 +848,18 @@ public void testCrossClusterEnrichWithOnlyRemotePrivs() throws Exception {
848848
| ENRICH countries
849849
| STATS size=count(*) by country
850850
| SORT size DESC
851-
| LIMIT 2"""));
851+
| LIMIT 3"""));
852852
assertOK(response);
853853

854854
Map<String, Object> responseAsMap = entityAsMap(response);
855855
List<?> columns = (List<?>) responseAsMap.get("columns");
856856
List<?> values = (List<?>) responseAsMap.get("values");
857857
assertEquals(2, columns.size());
858-
assertEquals(2, values.size());
858+
assertEquals(3, values.size());
859859
List<?> flatList = values.stream()
860860
.flatMap(innerList -> innerList instanceof List ? ((List<?>) innerList).stream() : Stream.empty())
861861
.collect(Collectors.toList());
862-
assertThat(flatList, containsInAnyOrder(1, 3, "usa", "germany"));
862+
assertThat(flatList, containsInAnyOrder(1, 1, 3, "usa", "germany", "japan"));
863863
}
864864

865865
private void createAliases() throws Exception {

0 commit comments

Comments
 (0)