mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02: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:
parent
ec64f4799c
commit
222ccd912a
14 changed files with 22 additions and 33 deletions
|
@ -31,13 +31,11 @@ import static org.joda.time.Duration.standardDays;
|
|||
|
||||
import com.google.appengine.tools.cloudstorage.GcsFilename;
|
||||
import com.google.appengine.tools.cloudstorage.GcsService;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.testing.FakeClock;
|
||||
|
@ -97,7 +95,7 @@ public class GenerateZoneFilesActionTest extends MapreduceTestCase<GenerateZoneF
|
|||
.build());
|
||||
|
||||
GenerateZoneFilesAction action = new GenerateZoneFilesAction();
|
||||
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent());
|
||||
action.mrRunner = makeDefaultRunner();
|
||||
action.bucket = "zonefiles-bucket";
|
||||
action.gcsBufferSize = 123;
|
||||
action.datastoreRetention = standardDays(29);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue