[clang-tools-extra] b15127d - [clangd] Disable flaky test
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 7 10:17:17 PDT 2022
Author: Sam McCall
Date: 2022-07-07T19:17:09+02:00
New Revision: b15127d0562cd6e1fc65abc1e967c56fa18391a7
URL: https://github.com/llvm/llvm-project/commit/b15127d0562cd6e1fc65abc1e967c56fa18391a7
DIFF: https://github.com/llvm/llvm-project/commit/b15127d0562cd6e1fc65abc1e967c56fa18391a7.diff
LOG: [clangd] Disable flaky test
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 995ad992d51be..8cb1ba93a5929 100644
--- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
@@ -1409,10 +1409,10 @@ TEST_F(TUSchedulerTests, PreambleThrottle) {
}
void release(RequestID ID) override {
- Releases.push_back(ID);
Callback SatisfyNext;
{
std::lock_guard<std::mutex> Lock(Mu);
+ Releases.push_back(ID);
if (ID > 0 && Acquires.size() == NumRequests)
SatisfyNext = std::move(Callbacks[ID - 1]);
}
@@ -1497,6 +1497,9 @@ TEST_F(TUSchedulerTests, PreambleThrottle) {
// We haven't released anything yet, we're still waiting.
EXPECT_THAT(Throttler.Releases, testing::IsEmpty());
+ // FIXME: This is flaky, becaues the request can be destroyed after shutdown
+ // if it hasn't been dequeued yet (stop() resets NextRequest).
+#if 0
// Now close file A, which will shut down its AST worker.
S.remove(A);
// Request is destroyed after the queue shutdown, so release() has happened.
@@ -1505,6 +1508,7 @@ TEST_F(TUSchedulerTests, PreambleThrottle) {
EXPECT_THAT(BuiltFilenames, testing::IsEmpty());
// But we've cancelled the request to build A (not sure which its ID is).
EXPECT_THAT(Throttler.Releases, ElementsAre(AnyOf(1, 0)));
+#endif
// Now shut down the TU Scheduler.
}
More information about the cfe-commits
mailing list