From 09328c85528e12478845ef5ca310dde3498d66aa Mon Sep 17 00:00:00 2001 From: Pierre Date: Thu, 29 Jul 2021 14:38:43 +0200 Subject: [PATCH] restore Byteman entrypoint used for tests --- .../java/org/sonar/server/user/index/UserIndexer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexer.java b/server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexer.java index 73c1f1875f6..ff49c509862 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexer.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexer.java @@ -92,10 +92,14 @@ public class UserIndexer implements ResilientIndexer { dbClient.esQueueDao().insert(dbSession, items); dbSession.commit(); - postCommit(dbSession, items); + postCommit(dbSession, users.stream().map(UserDto::getLogin).collect(toList()), items); } - private void postCommit(DbSession dbSession, Collection items) { + /** + * Entry point for Byteman tests. See directory tests/resilience. + * The parameter "logins" is used only by the Byteman script. + */ + private void postCommit(DbSession dbSession, Collection logins, Collection items) { index(dbSession, items); } -- 2.39.5