mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 12:56:53 +00:00
Fix mutator in GetRolesRequestTests (#35932)
There was no guarantee that the mutated object would not be the same as the original object (and was for seed 6A8C4CBF63B5AA63) Resolves #35947
This commit is contained in:
parent
cb8646ac0e
commit
8d9e21ffaa
@ -47,6 +47,7 @@ public class GetRolesRequestTests extends ESTestCase {
|
||||
}
|
||||
|
||||
private static GetRolesRequest mutateTestItem(GetRolesRequest original) {
|
||||
return new GetRolesRequest(randomArray(0, 5, String[]::new, () -> randomAlphaOfLength(5)));
|
||||
final int minRoles = original.getRoleNames().isEmpty() ? 1 : 0;
|
||||
return new GetRolesRequest(randomArray(minRoles, 5, String[]::new, () -> randomAlphaOfLength(6)));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user