-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It turns out that unit tests in NamedEventTest (e.g. NamedEventBasicTest) were written with an assumption that Util::Sleep() is reliable and the test environment has enough CPU cores. Unfortunately, this kind of tests are quite flaky on VM with a few virtual cores. To make those tests deterministic and reliable, this CL only checks if NamedEventNotifier::Notify() happens before NamedEventListener::Wait() returns true. This CL also does: - Use TEST_F to make sure that user profile directory is isolated from the real user environment. - Use std::unique_ptr when possible. - Remove non-essential loops from IsOwnerTest and NamedEventBasicTest. We can already rely on gtest's options when we need those kind of stress tests hence hard-coding such a stress-test does not make much sense. BUG= TEST=unittest REF_BUG= REF_CL=105736130
- Loading branch information
Showing
2 changed files
with
99 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters