Add project watches to AccountState
We need the project watches in AccountState so that we can add watched projects to the account index later. This change requires a manual flush of the account cache. Change-Id: I3bbeb623c20588a0cd44e5398a7a4079d9a79f32 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -29,7 +29,8 @@ public class FakeQueryBuilder extends ChangeQueryBuilder {
|
||||
FakeQueryBuilder.class),
|
||||
new ChangeQueryBuilder.Arguments(null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, indexes, null, null, null, null, null, null, null));
|
||||
null, null, null, indexes, null, null, null, null, null, null, null,
|
||||
null));
|
||||
}
|
||||
|
||||
@Operator
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.google.gerrit.common.TimeUtil;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.AccountExternalId;
|
||||
import com.google.gerrit.reviewdb.client.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.client.AccountProjectWatch;
|
||||
import com.google.gerrit.server.account.AccountCache;
|
||||
import com.google.gerrit.server.account.AccountState;
|
||||
|
||||
@@ -298,6 +299,7 @@ public class FromAddressGeneratorProviderTest {
|
||||
account.setFullName(name);
|
||||
account.setPreferredEmail(email);
|
||||
return new AccountState(account, Collections.<AccountGroup.UUID> emptySet(),
|
||||
Collections.<AccountExternalId> emptySet());
|
||||
Collections.<AccountExternalId> emptySet(),
|
||||
Collections.<AccountProjectWatch> emptySet());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.google.gerrit.common.TimeUtil;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.AccountExternalId;
|
||||
import com.google.gerrit.reviewdb.client.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.client.AccountProjectWatch;
|
||||
import com.google.gerrit.server.account.AccountCache;
|
||||
import com.google.gerrit.server.account.AccountState;
|
||||
|
||||
@@ -73,8 +74,8 @@ public class FakeAccountCache implements AccountCache {
|
||||
}
|
||||
|
||||
private static AccountState newState(Account account) {
|
||||
return new AccountState(
|
||||
account, ImmutableSet.<AccountGroup.UUID> of(),
|
||||
ImmutableSet.<AccountExternalId> of());
|
||||
return new AccountState(account, ImmutableSet.<AccountGroup.UUID> of(),
|
||||
ImmutableSet.<AccountExternalId> of(),
|
||||
ImmutableSet.<AccountProjectWatch> of());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user