mirror of
https://github.com/google/nomulus
synced 2026-08-19 21:56:17 +00:00
Centralize creation of MapreduceRunner in unit tests
This also changes the default number of mapper shards in tests to 2, which is the number of EppResourceIndex buckets in unit tests. Running more shards than there are buckets causes unnecessary test load. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=135520601
This commit is contained in:
@@ -26,11 +26,9 @@ import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
import static org.mockito.Mockito.verifyZeroInteractions;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.dns.DnsQueue;
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.request.HttpException.BadRequestException;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
@@ -64,7 +62,7 @@ public class DnsRefreshForHostRenameActionTest
|
||||
private void runMapreduce(String hostKeyString) throws Exception {
|
||||
action = new DnsRefreshForHostRenameAction();
|
||||
action.hostKeyString = hostKeyString;
|
||||
action.mrRunner = new MapreduceRunner(Optional.<Integer>of(5), Optional.<Integer>absent());
|
||||
action.mrRunner = makeDefaultRunner();
|
||||
action.response = new FakeResponse();
|
||||
action.run();
|
||||
executeTasksUntilEmpty("mapreduce");
|
||||
|
||||
Reference in New Issue
Block a user