[clang-tools-extra] r326598 - [clangd] Use higher timoout values in TUSchedulerTest::Debounce

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 2 10:23:41 PST 2018


Author: ibiryukov
Date: Fri Mar  2 10:23:41 2018
New Revision: 326598

URL: http://llvm.org/viewvc/llvm-project?rev=326598&view=rev
Log:
[clangd] Use higher timoout values in TUSchedulerTest::Debounce

Should unbreak windows buildbots.

Modified:
    clang-tools-extra/trunk/unittests/clangd/TUSchedulerTests.cpp

Modified: clang-tools-extra/trunk/unittests/clangd/TUSchedulerTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/TUSchedulerTests.cpp?rev=326598&r1=326597&r2=326598&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/TUSchedulerTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/TUSchedulerTests.cpp Fri Mar  2 10:23:41 2018
@@ -127,16 +127,17 @@ TEST_F(TUSchedulerTests, Debounce) {
     TUScheduler S(getDefaultAsyncThreadsCount(),
                   /*StorePreamblesInMemory=*/true,
                   /*ASTParsedCallback=*/nullptr,
-                  /*UpdateDebounce=*/std::chrono::milliseconds(50));
+                  /*UpdateDebounce=*/std::chrono::seconds(1));
+    // FIXME: we could probably use timeouts lower than 1 second here.
     auto Path = testPath("foo.cpp");
     S.update(Path, getInputs(Path, "auto (debounced)"), WantDiagnostics::Auto,
              [&](std::vector<DiagWithFixIts> Diags) {
                ADD_FAILURE() << "auto should have been debounced and canceled";
              });
-    std::this_thread::sleep_for(std::chrono::milliseconds(10));
+    std::this_thread::sleep_for(std::chrono::milliseconds(200));
     S.update(Path, getInputs(Path, "auto (timed out)"), WantDiagnostics::Auto,
              [&](std::vector<DiagWithFixIts> Diags) { ++CallbackCount; });
-    std::this_thread::sleep_for(std::chrono::milliseconds(60));
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     S.update(Path, getInputs(Path, "auto (shut down)"), WantDiagnostics::Auto,
              [&](std::vector<DiagWithFixIts> Diags) { ++CallbackCount; });
   }




More information about the cfe-commits mailing list