Reduce mapreduce shards in tests

This fixes a significant memory consumption issue when running tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129482832
This commit is contained in:
Ben McIlwain 2016-08-05 14:29:13 -07:00 committed by Justine Tunney
parent 1ef8716177
commit 92fa0d6781
5 changed files with 5 additions and 5 deletions

View file

@ -71,7 +71,7 @@ public class ExpandRecurringBillingEventsActionTest
@Before @Before
public void init() { public void init() {
action = new ExpandRecurringBillingEventsAction(); action = new ExpandRecurringBillingEventsAction();
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent()); action.mrRunner = new MapreduceRunner(Optional.<Integer>of(5), Optional.<Integer>absent());
action.clock = clock; action.clock = clock;
action.cursorTimeParam = Optional.absent(); action.cursorTimeParam = Optional.absent();
createTld("tld"); createTld("tld");

View file

@ -71,7 +71,7 @@ public abstract class DeleteEppResourceActionTestCase<T extends DeleteEppResourc
public void setupDeleteEppResourceAction(T deleteEppResourceAction) throws Exception { public void setupDeleteEppResourceAction(T deleteEppResourceAction) throws Exception {
action = deleteEppResourceAction; action = deleteEppResourceAction;
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent()); action.mrRunner = new MapreduceRunner(Optional.<Integer>of(5), Optional.<Integer>absent());
action.response = new FakeResponse(); action.response = new FakeResponse();
action.clock = clock; action.clock = clock;
inject.setStaticField(Ofy.class, "clock", clock); inject.setStaticField(Ofy.class, "clock", clock);

View file

@ -65,7 +65,7 @@ public class DnsRefreshForHostRenameActionTest
private void runMapreduce(String hostKeyString) throws Exception { private void runMapreduce(String hostKeyString) throws Exception {
action = new DnsRefreshForHostRenameAction(); action = new DnsRefreshForHostRenameAction();
action.hostKeyString = hostKeyString; action.hostKeyString = hostKeyString;
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent()); action.mrRunner = new MapreduceRunner(Optional.<Integer>of(5), Optional.<Integer>absent());
action.response = new FakeResponse(); action.response = new FakeResponse();
action.run(); action.run();
executeTasksUntilEmpty("mapreduce"); executeTasksUntilEmpty("mapreduce");

View file

@ -74,7 +74,7 @@ public class DeleteProberDataActionTest extends MapreduceTestCase<DeleteProberDa
persistResource(Registry.get("oa-canary.test").asBuilder().setTldType(TldType.TEST).build()); persistResource(Registry.get("oa-canary.test").asBuilder().setTldType(TldType.TEST).build());
action = new DeleteProberDataAction(); action = new DeleteProberDataAction();
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent()); action.mrRunner = new MapreduceRunner(Optional.<Integer>of(5), Optional.<Integer>absent());
action.response = new FakeResponse(); action.response = new FakeResponse();
action.isDryRun = false; action.isDryRun = false;
} }

View file

@ -37,7 +37,7 @@ public class ResaveAllEppResourcesActionTest
@Before @Before
public void init() { public void init() {
action = new ResaveAllEppResourcesAction(); action = new ResaveAllEppResourcesAction();
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent()); action.mrRunner = new MapreduceRunner(Optional.<Integer>of(5), Optional.<Integer>absent());
action.response = new FakeResponse(); action.response = new FakeResponse();
} }