[infra] Fixes for now.TimeTravelingContext
This changed upstream to always accept the parent context.
Change-Id: I419cae935e03163a3cc6645344cad00900c5d1c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1053079
Reviewed-by: Brett Somocurcio <brettos@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
diff --git a/infra/bots/task_drivers/bazel_test_benchmark/bazel_test_benchmark_test.go b/infra/bots/task_drivers/bazel_test_benchmark/bazel_test_benchmark_test.go
index f01de88..51f436e 100644
--- a/infra/bots/task_drivers/bazel_test_benchmark/bazel_test_benchmark_test.go
+++ b/infra/bots/task_drivers/bazel_test_benchmark/bazel_test_benchmark_test.go
@@ -63,7 +63,7 @@
// Make sure we use UTC instead of the system timezone. The GCS path reflects the fact that
// we convert from UTC+1 to UTC.
fakeNow := time.Date(2022, time.January, 31, 2, 2, 3, 0, time.FixedZone("UTC+1", 60*60))
- ctx = now.TimeTravelingContext(fakeNow).WithContext(ctx)
+ ctx = now.TimeTravelingContext(ctx, fakeNow)
ctx = td.WithExecRunFn(ctx, commandCollector.Run)
var bazelCacheDirPath string
ctx, bazelCacheDirPath = common.WithEnoughSpaceOnBazelCachePartitionTestOnlyContext(ctx)
diff --git a/infra/bots/task_drivers/bazel_test_precompiled/bazel_test_precompiled_test.go b/infra/bots/task_drivers/bazel_test_precompiled/bazel_test_precompiled_test.go
index 4d09239..79ebeca 100644
--- a/infra/bots/task_drivers/bazel_test_precompiled/bazel_test_precompiled_test.go
+++ b/infra/bots/task_drivers/bazel_test_precompiled/bazel_test_precompiled_test.go
@@ -268,7 +268,7 @@
// Make sure we use UTC instead of the system timezone. The GCS path reflects the fact that
// we convert from UTC+1 to UTC.
fakeNow := time.Date(2022, time.January, 31, 2, 2, 3, 0, time.FixedZone("UTC+1", 60*60))
- ctx = now.TimeTravelingContext(fakeNow).WithContext(ctx)
+ ctx = now.TimeTravelingContext(ctx, fakeNow)
ctx = td.WithExecRunFn(ctx, commandCollector.Run)
err := run(ctx, tdArgs)
diff --git a/infra/bots/task_drivers/common/perf_steps_test.go b/infra/bots/task_drivers/common/perf_steps_test.go
index e13929e..b7414c5 100644
--- a/infra/bots/task_drivers/common/perf_steps_test.go
+++ b/infra/bots/task_drivers/common/perf_steps_test.go
@@ -234,7 +234,7 @@
// Make sure we use UTC instead of the system timezone. The GCS path reflects the fact that
// we convert from UTC+1 to UTC.
fakeNow := time.Date(2022, time.January, 31, 2, 2, 3, 0, time.FixedZone("UTC+1", 60*60))
- ctx = now.TimeTravelingContext(fakeNow).WithContext(ctx)
+ ctx = now.TimeTravelingContext(ctx, fakeNow)
// We don't need to assert the exact number of times that os_steps.TempDir() is called
// because said function produces a "Creating TempDir" task driver step, and we check the
@@ -307,7 +307,7 @@
// Make sure we use UTC instead of the system timezone. The GCS path reflects the fact that
// we convert from UTC+1 to UTC.
fakeNow := time.Date(2022, time.January, 31, 2, 2, 3, 0, time.FixedZone("UTC+1", 60*60))
- ctx = now.TimeTravelingContext(fakeNow).WithContext(ctx)
+ ctx = now.TimeTravelingContext(ctx, fakeNow)
err := UploadToPerf(ctx, gcsClient, benchmarkInfo, outputsDir)
assert.NoError(t, err)