Skip to content

Commit be22d2a

Browse files
[Test] Fix SearchRequestCacheDisablingInterceptorTests (#114828)
The #113501 PR introduced a change where `:index-name` is no longer considered a valid remote index name. The valid remote index name has to have a non-empty remote cluster name, e.g. `my-remote-cluster:index-name`. This PR changes tests to avoid randomly generating empty remote cluster names. Resolves #113659, #113660
1 parent 156ba2c commit be22d2a

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,6 @@ tests:
206206
- class: org.elasticsearch.smoketest.MlWithSecurityIT
207207
method: test {yaml=ml/3rd_party_deployment/Test start and stop multiple deployments}
208208
issue: https://github.com/elastic/elasticsearch/issues/101458
209-
- class: org.elasticsearch.xpack.security.authz.interceptor.SearchRequestCacheDisablingInterceptorTests
210-
method: testHasRemoteIndices
211-
issue: https://github.com/elastic/elasticsearch/issues/113660
212-
- class: org.elasticsearch.xpack.security.authz.interceptor.SearchRequestCacheDisablingInterceptorTests
213-
method: testRequestCacheWillBeDisabledWhenSearchRemoteIndices
214-
issue: https://github.com/elastic/elasticsearch/issues/113659
215209
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
216210
method: test {categorize.Categorize ASYNC}
217211
issue: https://github.com/elastic/elasticsearch/issues/113721

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/interceptor/SearchRequestCacheDisablingInterceptorTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void testRequestCacheWillBeDisabledWhenSearchRemoteIndices() {
9191
0,
9292
3,
9393
String[]::new,
94-
() -> randomAlphaOfLengthBetween(0, 5) + ":" + randomAlphaOfLengthBetween(3, 8)
94+
() -> randomAlphaOfLengthBetween(1, 5) + ":" + randomAlphaOfLengthBetween(3, 8)
9595
);
9696
final ArrayList<String> allIndices = Arrays.stream(ArrayUtils.concat(localIndices, remoteIndices))
9797
.collect(Collectors.toCollection(ArrayList::new));
@@ -121,7 +121,7 @@ public void testHasRemoteIndices() {
121121
0,
122122
3,
123123
String[]::new,
124-
() -> randomAlphaOfLengthBetween(0, 5) + ":" + randomAlphaOfLengthBetween(3, 8)
124+
() -> randomAlphaOfLengthBetween(1, 5) + ":" + randomAlphaOfLengthBetween(3, 8)
125125
);
126126
final ArrayList<String> allIndices = Arrays.stream(ArrayUtils.concat(localIndices, remoteIndices))
127127
.collect(Collectors.toCollection(ArrayList::new));

0 commit comments

Comments
 (0)