[clang-tools-extra] 69feef0 - [clangd][tests] Assert for idleness of scheduler
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 1 03:21:50 PDT 2023
Author: Kadir Cetinkaya
Date: 2023-09-01T12:19:09+02:00
New Revision: 69feef0e827793fd1c9df5dddc736441ff46f8af
URL: https://github.com/llvm/llvm-project/commit/69feef0e827793fd1c9df5dddc736441ff46f8af
DIFF: https://github.com/llvm/llvm-project/commit/69feef0e827793fd1c9df5dddc736441ff46f8af.diff
LOG: [clangd][tests] Assert for idleness of scheduler
We could fail going idle in 5 seconds and get spurious errors
afterwards. See https://github.com/llvm/llvm-project/issues/64964.
Differential Revision: https://reviews.llvm.org/D159337
Added:
Modified:
clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
index 5d5b618a854806..a3c1916b9b1d41 100644
--- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
@@ -1307,7 +1307,7 @@ TEST_F(TUSchedulerTests, PublishWithStalePreamble) {
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 @@ TEST_F(TUSchedulerTests, PublishWithStalePreamble) {
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"));
}
More information about the cfe-commits
mailing list