From 4e837599b3ee80ec205985dc6914e8bccae2d05e Mon Sep 17 00:00:00 2001 From: Albert Zaharovits Date: Mon, 13 Jan 2020 13:25:05 +0200 Subject: [PATCH] Nit fix test randomInt bound Relates 2b789fa3e6f743632066 --- .../org/elasticsearch/xpack/security/authz/RBACEngineTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/RBACEngineTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/RBACEngineTests.java index a8639a22135..1fedbffc76e 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/RBACEngineTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/RBACEngineTests.java @@ -550,7 +550,7 @@ public class RBACEngineTests extends ESTestCase { Authentication authentication = mock(Authentication.class); when(authentication.getUser()).thenReturn(user); final String patternPrefix = RestrictedIndicesNames.ASYNC_SEARCH_PREFIX.substring(0, - randomIntBetween(1, RestrictedIndicesNames.ASYNC_SEARCH_PREFIX.length() - 2)); + randomIntBetween(2, RestrictedIndicesNames.ASYNC_SEARCH_PREFIX.length() - 2)); Role role = Role.builder("role") .add(FieldPermissions.DEFAULT, null, IndexPrivilege.INDEX, false, patternPrefix + "*") .build();