Skip to content

Commit

Permalink
Make DummyExecutor's clock a ManualClock, not a real BlazeClock.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 331775722
  • Loading branch information
janakdr authored and copybara-github committed Sep 15, 2020
1 parent 3687084 commit 84834db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ java_library(
"//src/main/java/com/google/devtools/common/options",
"//src/main/java/net/starlark/java/syntax",
"//src/main/protobuf:action_cache_java_proto",
"//src/test/java/com/google/devtools/build/lib/testutil",
"//third_party:guava",
"//third_party:jsr305",
"//third_party:truth",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import com.google.devtools.build.lib.actions.ActionContext;
import com.google.devtools.build.lib.actions.ActionExecutionContext.ShowSubcommands;
import com.google.devtools.build.lib.actions.Executor;
import com.google.devtools.build.lib.clock.BlazeClock;
import com.google.devtools.build.lib.clock.Clock;
import com.google.devtools.build.lib.testutil.ManualClock;
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.common.options.OptionsProvider;
Expand All @@ -27,6 +27,7 @@ public class DummyExecutor implements Executor {

private final FileSystem fileSystem;
private final Path inputDir;
private final ManualClock clock = new ManualClock();

public DummyExecutor(FileSystem fileSystem, Path inputDir) {
this.fileSystem = fileSystem;
Expand All @@ -49,7 +50,7 @@ public Path getExecRoot() {

@Override
public Clock getClock() {
return BlazeClock.instance();
return clock;
}

@Override
Expand Down

0 comments on commit 84834db

Please sign in to comment.