[PATCH] D159337: [clangd][tests] Assert for idleness of scheduler
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 31 23:31:58 PDT 2023
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"));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159337.555275.patch
Type: text/x-patch
Size: 886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230901/9a6c950b/attachment.bin>
More information about the cfe-commits
mailing list