Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Commit a51a909

Browse files
authored
bug: remove flaky test (#996)
This should at the very least reduce the flakiness of the test. It was failing because the thread handling a callback *can* be the same thread if the event (in the test "the timer") is already satisfied when the callback is registered.
1 parent 059d384 commit a51a909

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

google/cloud/spanner/internal/background_threads_test.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,6 @@ TEST(AutomaticallyCreatedBackgroundThreads, IsActive) {
7979
EXPECT_EQ(std::future_status::ready, expired.wait_for(ms(100)));
8080
}
8181

82-
/// @test Verify the background thread is not the thread the current thread.
83-
TEST(AutomaticallyCreatedBackgroundThreads, IsNotCurrentThread) {
84-
AutomaticallyCreatedBackgroundThreads actual;
85-
86-
using ms = std::chrono::milliseconds;
87-
88-
future<std::thread::id> id = actual.cq().MakeRelativeTimer(ms(0)).then(
89-
[](future<std::chrono::system_clock::time_point>) {
90-
return std::this_thread::get_id();
91-
});
92-
EXPECT_EQ(std::future_status::ready, id.wait_for(ms(100)));
93-
EXPECT_NE(std::this_thread::get_id(), id.get());
94-
}
95-
9682
} // namespace
9783
} // namespace internal
9884
} // namespace SPANNER_CLIENT_NS

0 commit comments

Comments
 (0)