diff --git a/muted-tests.yml b/muted-tests.yml index 75768152d0dad..3700f688e77dd 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -389,9 +389,6 @@ tests: - class: org.elasticsearch.action.RejectionActionIT method: testSimulatedSearchRejectionLoad issue: https://github.com/elastic/elasticsearch/issues/125901 -- class: org.elasticsearch.xpack.security.authz.RBACEngineTests - method: testGetRoleDescriptorsIntersectionForRemoteClusterHasDeterministicOrderForIndicesPrivileges - issue: https://github.com/elastic/elasticsearch/issues/126061 - class: org.elasticsearch.search.CCSDuelIT method: testTerminateAfter issue: https://github.com/elastic/elasticsearch/issues/126085 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 2af7511ed70ef..9bd9938c19dff 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 @@ -1699,10 +1699,10 @@ public void testGetRoleDescriptorsIntersectionForRemoteClusterHasDeterministicOr Set splitBySelector = IndexPrivilege.resolveBySelectorAccess( Set.copyOf(randomSubsetOf(randomIntBetween(1, 4), IndexPrivilege.names())) ); - // If we end up with failure and data access, we will split and end up with extra groups. Need to account for this for the - // final assertion - if (splitBySelector.size() == 2) { - extraGroups++; + // If we end up with failure and data access (or failure, data and failure and data access), + // we will split and end up with extra groups. Need to account for this for the final assertion + if (splitBySelector.size() >= 2) { + extraGroups += splitBySelector.size() - 1; } for (var privilege : splitBySelector) { remoteIndicesBuilder.addGroup(