Re:10 years ago, someone wrote a test for servo that include...
by devin on Monday April 20, 2026 @11:09AM
(#47835452)
Are you joking? This is the kind of thing that leads to flaky tests. I was always counseled against the use of randomness in my tests, unless we're talking generative testing like quickcheck.
[ Parent
| on HN ]
Re:10 years ago, someone wrote a test for servo that include...
by whynotmaybe on Monday April 20, 2026 @11:13AM
(#47835521)
`today` is random.
Re:10 years ago, someone wrote a test for servo that include...
by Eldt on Monday April 20, 2026 @11:30AM
(#47835777)
It's dynamic, but it certainly isn't random, considering it follows a consistent sequence
Re:10 years ago, someone wrote a test for servo that include...
by InsideOutSanta on Monday April 20, 2026 @01:33PM
(#47837752)
If "today" were random, our universe would be pretty fricken weird.
Re:10 years ago, someone wrote a test for servo that include...
by devin on Sunday April 26, 2026 @12:51PM
(#47911727)
What is today right now in Australia? How about where you live? You have not thought enough about what you’re saying and are probably not aware of all the weird time issues we have in our world.
Re:10 years ago, someone wrote a test for servo that include...
by InsideOutSanta on Wednesday April 29, 2026 @04:14AM
(#47945500)
That's not what "random" means.
Re:10 years ago, someone wrote a test for servo that include...
by dathinab on Monday April 20, 2026 @12:25PM
(#47836556)
or, maybe, there is something hugely wrong with your code, review pipeline or tests if adding randomness to unit test values makes your tests flaky and this is a good way to find it
Re:10 years ago, someone wrote a test for servo that include...
by devin on Monday April 20, 2026 @02:13PM
(#47838356)
or, maybe, it signals insufficient thought about the boundary conditions that should or shouldn't trigger test failures.
doing random things to hopefully get a failure is fine if there's an actual purpose to it, but putting random values all over the place in the hopes it reveals a problem in your CI pipeline or something seems like a real weak reason to do it.
Re:10 years ago, someone wrote a test for servo that include...
by tomjakubowski on Monday April 20, 2026 @04:21PM
(#47839969)
I don't think anyone is advocating for random application of randomness.