Skip to content

Commit ed12a21

Browse files
cache?
1 parent 868da8e commit ed12a21

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

x-pack/plugin/security/qa/security-trial/src/javaRestTest/java/org/elasticsearch/xpack/security/dlsfls/DlsRequestCacheIT.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ public void testRequestCacheDisabledForDlsTemplateRoleWithPainless() throws IOEx
106106
.addHeader("Authorization", UsernamePasswordToken.basicAuthHeaderValue(DLS_USER, DLS_USER_PASSWORD))
107107
);
108108
assertSearchResponse(client.performRequest(searchRequest), Set.of("1"));
109-
// Cache should not be used since DLS query uses stored script
110-
assertCacheState(0, 0);
109+
assertCacheState(0, 1);
111110
}
112111

113112
@SuppressWarnings("unchecked")

x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DlsFlsRequestCacheTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public void testRequestCacheWithTemplateRoleQuery() {
342342
// Since the DLS for the alias uses a stored script, this should cause the request cached to be disabled
343343
assertSearchResponse(client1.prepareSearch(DLS_TEMPLATE_ROLE_QUERY_ALIAS).setRequestCache(true), Set.of("1"), Set.of("username"));
344344
// No cache should be used
345-
assertCacheState(DLS_TEMPLATE_ROLE_QUERY_INDEX, 2, 2);
345+
assertCacheState(DLS_TEMPLATE_ROLE_QUERY_INDEX, 3, 2);
346346
}
347347

348348
private void prepareIndices() {

0 commit comments

Comments
 (0)