jdm: "10 years ago, someone wrote a …"
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A Servo browser engine maintainer shares a story about a unit test written 10 years ago that used a hardcoded cookie expiry date of April 18, 2026, which has now broken CI. The thread evolves into a broader discussion about best practices for time-dependent tests, including mocking system time with tools like Timecop, using far-future dates like year 9999, or avoiding external state in tests altogether. Commenters share similar experiences with date-sensitive test failures and debate the tradeoffs of each approach.
Sort: