diff options
| author | Ilya Biryukov <ibiryukov@google.com> | 2018-03-02 18:23:41 +0000 |
|---|---|---|
| committer | Ilya Biryukov <ibiryukov@google.com> | 2018-03-02 18:23:41 +0000 |
| commit | ddedde9aa077434c80fabc837b9dc9c22e4f6979 (patch) | |
| tree | 2bbd661762fe4cc4aa34873749f3e188de19a069 | |
| parent | 8cbc1d232bd581539cd4d6030725e36fe113625d (diff) | |
| download | bcm5719-llvm-ddedde9aa077434c80fabc837b9dc9c22e4f6979.tar.gz bcm5719-llvm-ddedde9aa077434c80fabc837b9dc9c22e4f6979.zip | |
[clangd] Use higher timoout values in TUSchedulerTest::Debounce
Should unbreak windows buildbots.
llvm-svn: 326598
| -rw-r--r-- | clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp b/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp index 51b7df832d8..14588d6b7fc 100644 --- a/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp +++ b/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp @@ -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; }); } |

