Commit 30559c26 authored by Donn Denman's avatar Donn Denman Committed by Commit Bot

[TTS] Disable clock sanity checks: for flaky bots.

Disables sanity checks on clock times that are primarily used
as a signal for Tap suppression.

This should help bots with flaky clocks or ones that are not set
correctly to still pass tests.

BUG = 1094008, 1101070

Change-Id: Idd7d019cacd77b987b95c3a082a6bbaffb3c7a1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2276676Reviewed-by: default avatarFilip Gorski <fgorski@chromium.org>
Commit-Queue: Donn Denman <donnd@chromium.org>
Auto-Submit: Donn Denman <donnd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784191}
parent 0f9ec0e0
...@@ -12,7 +12,8 @@ namespace { ...@@ -12,7 +12,8 @@ namespace {
const double kSecondsPerWeek = const double kSecondsPerWeek =
base::Time::kMicrosecondsPerWeek / base::Time::kMicrosecondsPerSecond; base::Time::kMicrosecondsPerWeek / base::Time::kMicrosecondsPerSecond;
// Used for validation in debug build. Week numbers are > 2300 as of year 2016. // Used for validation in debug build. Week numbers are > 2300 as of year 2016.
const int kReasonableMinWeek = 2000; // TODO(donnd): reenable this const. https://crbug.com/1094008. See below.
// const int kReasonableMinWeek = 2000;
} // namespace } // namespace
...@@ -23,7 +24,9 @@ CtrAggregator::CtrAggregator(WeeklyActivityStorage& storage) ...@@ -23,7 +24,9 @@ CtrAggregator::CtrAggregator(WeeklyActivityStorage& storage)
base::Time now = base::Time::NowFromSystemTime(); base::Time now = base::Time::NowFromSystemTime();
double now_in_seconds = now.ToDoubleT(); double now_in_seconds = now.ToDoubleT();
week_number_ = now_in_seconds / kSecondsPerWeek; week_number_ = now_in_seconds / kSecondsPerWeek;
DCHECK(week_number_ >= kReasonableMinWeek); // TODO(donnd): reenable this DCHECK. Some bots have bad clocks or time
// settings, causing flaky test failures. https://crbug.com/1094008.
// DCHECK(week_number_ >= kReasonableMinWeek);
// NOTE: This initialization may callback into the storage implementation so // NOTE: This initialization may callback into the storage implementation so
// that needs to be fully initialized when constructing this aggregator. // that needs to be fully initialized when constructing this aggregator.
storage_.AdvanceToWeek(week_number_); storage_.AdvanceToWeek(week_number_);
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
namespace { namespace {
// Used for validation in debug build. Week numbers are > 2300 as of year 2016. // Used for validation in debug build. Week numbers are > 2300 as of year 2016.
const int kReasonableMinWeek = 2000; // TODO(donnd): reenable this const. https://crbug.com/1094008. See below.
// const int kReasonableMinWeek = 2000;
} // namespace } // namespace
...@@ -60,7 +61,9 @@ int WeeklyActivityStorage::GetWeekRemainder(int which_week) { ...@@ -60,7 +61,9 @@ int WeeklyActivityStorage::GetWeekRemainder(int which_week) {
} }
void WeeklyActivityStorage::EnsureHasActivity(int which_week) { void WeeklyActivityStorage::EnsureHasActivity(int which_week) {
DCHECK(which_week > kReasonableMinWeek); // TODO(donnd): reenable this DCHECK. Some bots have bad clocks or time
// settings, causing flaky test failures. https://crbug.com/1094008.
// DCHECK(which_week > kReasonableMinWeek);
// If still on the newest week we're done! // If still on the newest week we're done!
int newest_week = ReadNewestWeekWritten(); int newest_week = ReadNewestWeekWritten();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment