Skip to content

Commit 011cb90

Browse files
authored
Merge pull request #11586 from swiftlang/cherrypick-605e2d1
[lldb] Make MainLoopTest::CallbackWithTimeout slightly more resilient…
2 parents e67ef3e + 8bdf5fc commit 011cb90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/unittests/Host/MainLoopTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ TEST_F(MainLoopTest, ManyPendingCallbacks) {
421421

422422
TEST_F(MainLoopTest, CallbackWithTimeout) {
423423
MainLoop loop;
424+
auto start = std::chrono::steady_clock::now();
424425
loop.AddCallback([](MainLoopBase &loop) { loop.RequestTermination(); },
425426
std::chrono::seconds(2));
426-
auto start = std::chrono::steady_clock::now();
427427
ASSERT_THAT_ERROR(loop.Run().takeError(), llvm::Succeeded());
428428
EXPECT_GE(std::chrono::steady_clock::now() - start, std::chrono::seconds(2));
429429
}

0 commit comments

Comments
 (0)