From 344973841164d8f4fea49a13fbffd0db7520b409 Mon Sep 17 00:00:00 2001 From: Googler Date: Fri, 11 Aug 2023 13:42:30 -0700 Subject: [PATCH] Don't call `removeReverseDep` on a non-incremental node entry in tests. It's illegal. There must be some race in propagating the failure from the async thread since the test is only flakily failing since https://github.com/bazelbuild/bazel/commit/20c541cf2e910d9e85ccd42d076063fba97251a7 (albeit at a very high rate). PiperOrigin-RevId: 556074380 Change-Id: I6c177d0346cb9849b5aa81c104ad9295548f5a84 --- .../java/com/google/devtools/build/skyframe/GraphTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/google/devtools/build/skyframe/GraphTest.java b/src/test/java/com/google/devtools/build/skyframe/GraphTest.java index 0e2f3e46ee2b04..350492b6758bf8 100644 --- a/src/test/java/com/google/devtools/build/skyframe/GraphTest.java +++ b/src/test/java/com/google/devtools/build/skyframe/GraphTest.java @@ -260,7 +260,9 @@ public void testAddRemoveRdeps() throws Exception { waitForAddedRdep.countDown(); waitForSetValue.await(TestUtils.WAIT_TIMEOUT_SECONDS, SECONDS); for (int k = chunkSize; k <= numIterations; k++) { - entry.removeReverseDep(key("rdep" + j)); + if (shouldTestIncrementality()) { + entry.removeReverseDep(key("rdep" + j)); + } entry.addReverseDepAndCheckIfDone(key("rdep" + j)); if (shouldTestIncrementality()) { entry.getReverseDepsForDoneEntry();