SuggestReviewersIT: Fix assignment to unused variable
A test account is created and stored in a variable that is not
explicitly used in the test. The account creation is still needed
to make sure the suggestion does not return that account based on
the email address.
Remove the unused variable, and add an explanatory comment to
the test.
Change-Id: I432e273ae0483d22abf743c8720d879e9b18aef8
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java b/javatests/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java
index 3b7a294..18034c9 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java
@@ -541,9 +541,9 @@
@Test
public void cannotSuggestBySecondaryEmailWithoutModifyAccount() throws Exception {
- String secondaryEmail = "foo.secondary@example.com";
- TestAccount foo = createAccountWithSecondaryEmail("foo", secondaryEmail);
-
+ // Test that even if the account exists, the result is still empty since
+ // it shouldn't match to that account based only on the secondary email.
+ createAccountWithSecondaryEmail("foo", "foo.secondary@example.com");
requestScopeOperations.setApiUser(user.id());
List<SuggestedReviewerInfo> reviewers = suggestReviewers(createChangeFromApi(), "secondary", 4);
assertThat(reviewers).isEmpty();