Migrate writeLockTimeout field out of DnsQueue

This makes the usage of DnsQueue.create() safer, since we're no longer
forced to hardcode a copy of the @Config("dnsWriteLockTimeout") value
within that method.  That value is only needed for leaseTasks(), which
is only called in one place (ReadDnsQueueAction), so we can just pass
it in from that callsite.

Also removes an unused overload of leaseTasks() that allowed specifying
a tag, which is a feature we no longer need.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136162491
This commit is contained in:
nickfelt 2016-10-14 09:05:25 -07:00 committed by Ben McIlwain
parent 17475fe7e8
commit e6ba5687b1
4 changed files with 7 additions and 25 deletions

View file

@ -22,7 +22,6 @@ import static google.registry.testing.TaskQueueHelper.assertTasksEnqueued;
import google.registry.testing.AppEngineRule;
import google.registry.testing.ExceptionRule;
import google.registry.testing.TaskQueueHelper.TaskMatcher;
import org.joda.time.Duration;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@ -49,7 +48,6 @@ public class DnsQueueTest {
dnsQueue = new DnsQueue();
dnsQueue.queue = getQueue("dns-pull");
dnsQueue.writeBatchSize = 10;
dnsQueue.writeLockTimeout = Duration.standardSeconds(30);
}
@Test