Add minor refactoring follow-up for RefreshDnsForAllDomainsAction (#2063)

This is a follow-on to comments in PR #2037. It makes the main loop cleaner and
also removes ambiguities around database handling when the first query is run
with the cursor still empty because no results have been found yet.
This commit is contained in:
Ben McIlwain
2023-07-05 15:09:20 -04:00
committed by GitHub
parent 04c6652793
commit ad68052524
2 changed files with 23 additions and 18 deletions
@@ -75,8 +75,8 @@ public class RefreshDnsForAllDomainsActionTest {
action =
new RefreshDnsForAllDomainsAction(
response, ImmutableSet.of("bar"), Optional.of(1), new Random());
tm().transact(() -> action.refreshBatch("", 1000));
tm().transact(() -> action.refreshBatch("", 1000));
tm().transact(() -> action.refreshBatch(Optional.empty(), 1000));
tm().transact(() -> action.refreshBatch(Optional.empty(), 1000));
ImmutableList<DnsRefreshRequest> refreshRequests =
tm().transact(
() ->