Skip to content

Commit 69feef0

Browse files
committed
[clangd][tests] Assert for idleness of scheduler
We could fail going idle in 5 seconds and get spurious errors afterwards. See #64964. Differential Revision: https://reviews.llvm.org/D159337
1 parent aca8b9d commit 69feef0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ TEST_F(TUSchedulerTests, PublishWithStalePreamble) {
13071307
ASSERT_THAT(BlockForDiags(PI), testing::Pair("1", "3"));
13081308

13091309
UnblockPreamble.notify();
1310-
S.blockUntilIdle(timeoutSeconds(5));
1310+
ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(5)));
13111311

13121312
// Make sure that we have eventual consistency.
13131313
EXPECT_THAT(Collector.diagVersions().back(), Pair(PI.Version, PI.Version));
@@ -1316,7 +1316,7 @@ TEST_F(TUSchedulerTests, PublishWithStalePreamble) {
13161316
PI.Version = "4";
13171317
PI.Contents = "#define FOO\n" + PI.Version;
13181318
S.update(File, PI, WantDiagnostics::No);
1319-
S.blockUntilIdle(timeoutSeconds(5));
1319+
ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(5)));
13201320
EXPECT_THAT(Collector.diagVersions().back(), Pair("3", "3"));
13211321
}
13221322

0 commit comments

Comments
 (0)