diff options
Diffstat (limited to 'absl/synchronization/internal/kernel_timeout_test.cc')
-rw-r--r-- | absl/synchronization/internal/kernel_timeout_test.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/absl/synchronization/internal/kernel_timeout_test.cc b/absl/synchronization/internal/kernel_timeout_test.cc index bc546719..33962f86 100644 --- a/absl/synchronization/internal/kernel_timeout_test.cc +++ b/absl/synchronization/internal/kernel_timeout_test.cc @@ -36,7 +36,7 @@ extern "C" int __clock_gettime(clockid_t c, struct timespec* ts); extern "C" int clock_gettime(clockid_t c, struct timespec* ts) { if (c == CLOCK_MONOTONIC && !absl::synchronization_internal::KernelTimeout::SupportsSteadyClock()) { - absl::SharedBitGen gen; + thread_local absl::BitGen gen; // NOLINT ts->tv_sec = absl::Uniform(gen, 0, 1'000'000'000); ts->tv_nsec = absl::Uniform(gen, 0, 1'000'000'000); return 0; @@ -58,7 +58,8 @@ constexpr absl::Duration kTimingBound = absl::Microseconds(250); using absl::synchronization_internal::KernelTimeout; -TEST(KernelTimeout, FiniteTimes) { +// TODO(b/348224897): re-enabled when the flakiness is fixed. +TEST(KernelTimeout, DISABLED_FiniteTimes) { constexpr absl::Duration kDurationsToTest[] = { absl::ZeroDuration(), absl::Nanoseconds(1), @@ -228,7 +229,8 @@ TEST(KernelTimeout, InfinitePast) { EXPECT_EQ(t.ToChronoDuration(), std::chrono::nanoseconds(0)); } -TEST(KernelTimeout, FiniteDurations) { +// TODO(b/348224897): re-enabled when the flakiness is fixed. +TEST(KernelTimeout, DISABLED_FiniteDurations) { constexpr absl::Duration kDurationsToTest[] = { absl::ZeroDuration(), absl::Nanoseconds(1), @@ -274,7 +276,8 @@ TEST(KernelTimeout, FiniteDurations) { } } -TEST(KernelTimeout, NegativeDurations) { +// TODO(b/348224897): re-enabled when the flakiness is fixed. +TEST(KernelTimeout, DISABLED_NegativeDurations) { constexpr absl::Duration kDurationsToTest[] = { -absl::ZeroDuration(), -absl::Nanoseconds(1), |