summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoussef Elghareeb <ghareeb@google.com>2023-11-06 19:10:46 +0100
committerLuca Milanesio <luca.milanesio@gmail.com>2023-11-10 15:03:50 +0000
commit71abbe6ff04a31d33923d45c07846f4ea0256ca8 (patch)
tree7bb3232328ba6f7bfee5ae22f99fbdc845b40fa9
parent30f122336a5be3212417b899e58c5c615b88b304 (diff)
AccountIT: adjust access modifiers of a few methods
This is to make them visible to sub-classes. We override/reuse these methods in Google. Release-Notes: skip Change-Id: I41ca4e631f9ad911ca609859f8149e7c5cdb30e9 (cherry picked from commit c8f428e801c5008073d441ee57730a670034c534)
-rw-r--r--javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java b/javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java
index a1c7a004e9..76289785a6 100644
--- a/javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java
@@ -84,6 +84,7 @@ import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
import com.google.gerrit.acceptance.testsuite.request.SshSessionFactory;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.common.RawInputUtil;
+import com.google.gerrit.common.UsedAt;
import com.google.gerrit.common.data.GlobalCapability;
import com.google.gerrit.entities.AccessSection;
import com.google.gerrit.entities.Account;
@@ -351,7 +352,8 @@ public class AccountIT extends AbstractDaemonTest {
assertThrows(ResourceNotFoundException.class, () -> gApi.accounts().id(input.username).get());
}
- private Account.Id createByAccountCreator(int expectedAccountReindexCalls) throws Exception {
+ @UsedAt(UsedAt.Project.GOOGLE)
+ protected Account.Id createByAccountCreator(int expectedAccountReindexCalls) throws Exception {
AccountIndexedCounter accountIndexedCounter = new AccountIndexedCounter();
try (Registration registration =
extensionRegistry.newRegistration().add(accountIndexedCounter)) {
@@ -3682,10 +3684,12 @@ public class AccountIT extends AbstractDaemonTest {
assertThat(loginResponse.getStatusLine().getStatusCode()).isEqualTo(expectedHttpStatus);
}
- private static class RefUpdateCounter implements GitReferenceUpdatedListener {
+ @UsedAt(UsedAt.Project.GOOGLE)
+ public static class RefUpdateCounter implements GitReferenceUpdatedListener {
private final AtomicLongMap<String> countsByProjectRefs = AtomicLongMap.create();
- static String projectRef(Project.NameKey project, String ref) {
+ @UsedAt(UsedAt.Project.GOOGLE)
+ public static String projectRef(Project.NameKey project, String ref) {
return projectRef(project.get(), ref);
}
@@ -3702,7 +3706,8 @@ public class AccountIT extends AbstractDaemonTest {
countsByProjectRefs.clear();
}
- void assertRefUpdateFor(String... projectRefs) {
+ @UsedAt(UsedAt.Project.GOOGLE)
+ public void assertRefUpdateFor(String... projectRefs) {
Map<String, Long> expectedRefUpdateCounts = new HashMap<>();
for (String projectRef : projectRefs) {
expectedRefUpdateCounts.put(projectRef, 1L);