Configure ProjectResetter through a plain data class.
Introduce ProjectResetter.Config and use that for defining what to reset. The old scheme used a Builder which used GUICE, which means the Builder cannot be instantiated unless the GUICE injector is already setup. Change-Id: Ic20995d2e05a4b76d9048a3c8052f1c3b1d0d1a5
This commit is contained in:
		@@ -25,7 +25,6 @@ import com.google.common.collect.ImmutableList;
 | 
			
		||||
import com.google.common.truth.FailureMetadata;
 | 
			
		||||
import com.google.common.truth.Subject;
 | 
			
		||||
import com.google.common.truth.Truth;
 | 
			
		||||
import com.google.gerrit.acceptance.ProjectResetter.Builder;
 | 
			
		||||
import com.google.gerrit.common.Nullable;
 | 
			
		||||
import com.google.gerrit.extensions.api.changes.RecipientType;
 | 
			
		||||
import com.google.gerrit.extensions.api.changes.ReviewInput;
 | 
			
		||||
@@ -63,10 +62,10 @@ public abstract class AbstractNotificationTest extends AbstractDaemonTest {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @Override
 | 
			
		||||
  protected ProjectResetter resetProjects(Builder resetter) throws IOException {
 | 
			
		||||
  protected ProjectResetter.Config resetProjects() {
 | 
			
		||||
    // Don't reset anything so that stagedUsers can be cached across all tests.
 | 
			
		||||
    // Without this caching these tests become much too slow.
 | 
			
		||||
    return resetter.build();
 | 
			
		||||
    return new ProjectResetter.Config();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  protected static FakeEmailSenderSubject assertThat(FakeEmailSender sender) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user