Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable EnvPosixTest.RunImmediately, add EnvPosixTest.RunEventually #4126

Closed

Conversation

riversand963
Copy link
Contributor

@riversand963 riversand963 commented Jul 12, 2018

The original EnvPosixTest.RunImmediately assumes that after scheduling
a background thread, the thread is guaranteed to complete after 0.1 second.
I do not know about any non-real-time OS/runtime providing this guarantee. Nor
does C++11 standard say anything about this in the documentation of std::thread.
In fact, we have observed this test failure multiple times on appveyor, and we
haven't been able to reproduce the failure deterministically. Therefore,
I disable this test for now until we know for sure how it used to fail.

Instead, I add another test EnvPosixTest.RunEventually that checks that
a thread will be scheduled eventually.

Test plan:

$make clean && make -j16
$./env_test --gtest_filter=EnvPosixTest.RunImmediately # runs 0 test
$./env_test --gtest_filter=EnvPosixTest.RunEventually # runs 1 test successfully

The original `EnvPosixTest.RunImmediately` assumes that after scheduling
a background thread, the thread is guaranteed to complete after 0.1 second.
I do not know about any non-real-time OS/runtime providing this guarantee. Nor
does C++11 standard say anything about this.
In fact, we have observed this test failure multiple times on appveyor, and we
haven't been able to reproduce the failure deterministically. Therefore,
I disable this test for now until we know for sure how it used to fail.

Instead, I add another test `EnvPosixTest.RunEventually` that checks that
a thread will be scheduled eventually.

Test plan:
```
$make clean && make -j16
$./env_test --gtest_filter=EnvPosixTest.RunImmediately # runs 0 test
$./env_test --gtest_filter=EnvPosixTest.RunEventually # runs 1 test successfully
```
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@riversand963 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@sagar0 sagar0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@riversand963 riversand963 changed the title Disable a test, add a new one. Disable a EnvPosixTest.RunImmediately, add EnvPosixTest.RunEventually. Jul 13, 2018
@riversand963 riversand963 changed the title Disable a EnvPosixTest.RunImmediately, add EnvPosixTest.RunEventually. Disable a EnvPosixTest.RunImmediately, add EnvPosixTest.RunEventually. Jul 13, 2018
@riversand963 riversand963 changed the title Disable a EnvPosixTest.RunImmediately, add EnvPosixTest.RunEventually. Disable EnvPosixTest.RunImmediately, add EnvPosixTest.RunEventually. Jul 13, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@riversand963 is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@riversand963 riversand963 deleted the disable_runimmediately branch July 13, 2018 02:24
@riversand963 riversand963 changed the title Disable EnvPosixTest.RunImmediately, add EnvPosixTest.RunEventually. Disable EnvPosixTest.RunImmediately, add EnvPosixTest.RunEventually Jul 23, 2018
rcane pushed a commit to rcane/rocksdb that referenced this pull request Sep 13, 2018
…acebook#4126)

Summary:
The original `EnvPosixTest.RunImmediately` assumes that after scheduling
a background thread, the thread is guaranteed to complete after 0.1 second.
I do not know about any non-real-time OS/runtime providing this guarantee. Nor
does C++11 standard say anything about this in the documentation of `std::thread`.
In fact, we have observed this test failure multiple times on appveyor, and we
haven't been able to reproduce the failure deterministically. Therefore,
I disable this test for now until we know for sure how it used to fail.

Instead, I add another test `EnvPosixTest.RunEventually` that checks that
a thread will be scheduled eventually.
Pull Request resolved: facebook#4126

Differential Revision: D8827086

Pulled By: riversand963

fbshipit-source-id: abc5cb655f90d50b791493da5eeb3716885dfe93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants