Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal change #3132

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading