kadircet created this revision. kadircet added reviewers: sammccall, nridge. Herald added subscribers: arphaman, javed.absar. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra.
We could fail going idle in 5 seconds and get spurious errors afterwards. See https://github.com/llvm/llvm-project/issues/64964. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D159337 Files: clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp Index: clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp +++ clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp @@ -1307,7 +1307,7 @@ ASSERT_THAT(BlockForDiags(PI), testing::Pair("1", "3")); UnblockPreamble.notify(); - S.blockUntilIdle(timeoutSeconds(5)); + ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(5))); // Make sure that we have eventual consistency. EXPECT_THAT(Collector.diagVersions().back(), Pair(PI.Version, PI.Version)); @@ -1316,7 +1316,7 @@ PI.Version = "4"; PI.Contents = "#define FOO\n" + PI.Version; S.update(File, PI, WantDiagnostics::No); - S.blockUntilIdle(timeoutSeconds(5)); + ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(5))); EXPECT_THAT(Collector.diagVersions().back(), Pair("3", "3")); }
Index: clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp +++ clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp @@ -1307,7 +1307,7 @@ ASSERT_THAT(BlockForDiags(PI), testing::Pair("1", "3")); UnblockPreamble.notify(); - S.blockUntilIdle(timeoutSeconds(5)); + ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(5))); // Make sure that we have eventual consistency. EXPECT_THAT(Collector.diagVersions().back(), Pair(PI.Version, PI.Version)); @@ -1316,7 +1316,7 @@ PI.Version = "4"; PI.Contents = "#define FOO\n" + PI.Version; S.update(File, PI, WantDiagnostics::No); - S.blockUntilIdle(timeoutSeconds(5)); + ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(5))); EXPECT_THAT(Collector.diagVersions().back(), Pair("3", "3")); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits