summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp b/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp
index 2842d508692..d51500d0e06 100644
--- a/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp
+++ b/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp
@@ -278,7 +278,7 @@ TEST_F(TUSchedulerTests, EvictedAST) {
// one that the cache will evict.
S.update(Foo, getInputs(Foo, SourceContents), WantDiagnostics::Yes,
[&BuiltASTCounter](std::vector<Diag> Diags) { ++BuiltASTCounter; });
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(1)));
+ ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
ASSERT_EQ(BuiltASTCounter.load(), 1);
// Build two more files. Since we can retain only 2 ASTs, these should be the
@@ -287,7 +287,7 @@ TEST_F(TUSchedulerTests, EvictedAST) {
[&BuiltASTCounter](std::vector<Diag> Diags) { ++BuiltASTCounter; });
S.update(Baz, getInputs(Baz, SourceContents), WantDiagnostics::Yes,
[&BuiltASTCounter](std::vector<Diag> Diags) { ++BuiltASTCounter; });
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(1)));
+ ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
ASSERT_EQ(BuiltASTCounter.load(), 3);
// Check only the last two ASTs are retained.
@@ -296,7 +296,7 @@ TEST_F(TUSchedulerTests, EvictedAST) {
// Access the old file again.
S.update(Foo, getInputs(Foo, OtherSourceContents), WantDiagnostics::Yes,
[&BuiltASTCounter](std::vector<Diag> Diags) { ++BuiltASTCounter; });
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(1)));
+ ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
ASSERT_EQ(BuiltASTCounter.load(), 4);
// Check the AST for foo.cpp is retained now and one of the others got
@@ -333,13 +333,13 @@ TEST_F(TUSchedulerTests, EmptyPreamble) {
0u);
});
// Wait for the preamble is being built.
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(1)));
+ ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
// Update the file which results in an empty preamble.
S.update(Foo, getInputs(Foo, WithEmptyPreamble), WantDiagnostics::Auto,
[](std::vector<Diag>) {});
// Wait for the preamble is being built.
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(1)));
+ ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
S.runWithPreamble("getEmptyPreamble", Foo,
[&](llvm::Expected<InputsAndPreamble> Preamble) {
// We expect to get an empty preamble.
@@ -409,7 +409,7 @@ TEST_F(TUSchedulerTests, NoopOnEmptyChanges) {
Updated = false;
S.update(Source, std::move(Inputs), WantDiagnostics::Yes,
[&Updated](std::vector<Diag>) { Updated = true; });
- bool UpdateFinished = S.blockUntilIdle(timeoutSeconds(1));
+ bool UpdateFinished = S.blockUntilIdle(timeoutSeconds(10));
if (!UpdateFinished)
ADD_FAILURE() << "Updated has not finished in one second. Threading bug?";
return Updated;
@@ -454,14 +454,14 @@ TEST_F(TUSchedulerTests, NoChangeDiags) {
// Make sure the AST was actually built.
cantFail(std::move(IA));
});
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(1)));
+ ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
// Even though the inputs didn't change and AST can be reused, we need to
// report the diagnostics, as they were not reported previously.
std::atomic<bool> SeenDiags(false);
S.update(FooCpp, getInputs(FooCpp, Contents), WantDiagnostics::Auto,
[&](std::vector<Diag>) { SeenDiags = true; });
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(1)));
+ ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
ASSERT_TRUE(SeenDiags);
// Subsequent request does not get any diagnostics callback because the same
@@ -469,7 +469,7 @@ TEST_F(TUSchedulerTests, NoChangeDiags) {
S.update(
FooCpp, getInputs(FooCpp, Contents), WantDiagnostics::Auto,
[&](std::vector<Diag>) { ADD_FAILURE() << "Should not be called."; });
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(1)));
+ ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
}
} // namespace
OpenPOWER on IntegriCloud