Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 696024387
  • Loading branch information
DeviceInfra authored and copybara-github committed Feb 12, 2025
1 parent 3c2e1e7 commit 35bef7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected abstract ResolveResult actuallyResolve(ResolveSource resolveSource)

/** Do the real pre process work. */
protected Set<ResolveResult> actuallyPreBatchProcess(List<ResolveSource> resolveSources)
throws MobileHarnessException, InterruptedException {
throws MobileHarnessException, InterruptedException, ExecutionException {
return ImmutableSet.of();
}

Expand Down Expand Up @@ -156,7 +156,7 @@ public final ListenableFuture<List<Optional<ResolveResult>>> resolveAsync(
* @param resolveSources all the files that one mobile test needs
*/
protected Set<ResolveResult> preBatchProcess(List<ResolveSource> resolveSources)
throws MobileHarnessException, InterruptedException {
throws MobileHarnessException, InterruptedException, ExecutionException {
Set<ResolveResult> resolveResults =
actuallyPreBatchProcess(
resolveSources.stream().filter(this::shouldActuallyResolve).collect(toImmutableList()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private void removeItemIfValueMatch(CachedResolveSource key, CachedResolveResult

@Override
protected Set<ResolveResult> preBatchProcess(List<ResolveSource> resolveSources)
throws MobileHarnessException, InterruptedException {
throws MobileHarnessException, InterruptedException, ExecutionException {
Set<ResolveResult> resolveResults = super.preBatchProcess(resolveSources);
for (ResolveResult resolveResult : resolveResults) {
resolvedResultsCache.putIfAbsent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.function.Function;
import org.junit.Rule;
Expand Down Expand Up @@ -133,7 +134,8 @@ public void batchResolve_parallelWithRealThreads()
}

@Test
public void preBatchProcess() throws MobileHarnessException, InterruptedException {
public void preBatchProcess()
throws MobileHarnessException, InterruptedException, ExecutionException {
resolver =
new FileResolverUnderTest(
MoreExecutors.newDirectExecutorService(), source -> source.path().equals("/a/b"));
Expand Down

0 comments on commit 35bef7e

Please sign in to comment.