-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Fix/minimize mock_time_env.h dependencies #7426
Conversation
Summary: (a) own copy of kMicrosInSecond (b) out-of-line sync point code Test Plan: FB internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with the exception of LIB_SOURCES
CMakeLists.txt
Outdated
@@ -731,6 +731,7 @@ set(SOURCES | |||
table/table_factory.cc | |||
table/table_properties.cc | |||
table/two_level_iterator.cc | |||
test_util/mock_time_env.cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be in TEST_LIB_SOURCES and not LIB_SOURCES?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just copying from sync_point.cc. I'll try it and see if I have difficulty working out the public as well as internal dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe TESTUTIL_SOURCE
for cmake.
src.mk
Outdated
@@ -178,6 +178,7 @@ LIB_SOURCES = \ | |||
table/table_factory.cc \ | |||
table/table_properties.cc \ | |||
table/two_level_iterator.cc \ | |||
test_util/mock_time_env.cc \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_LIB_SOURCES?
@@ -62,29 +64,11 @@ class MockTimeEnv : public EnvWrapper { | |||
// TODO: this is a workaround for the different behavior on different platform | |||
// for timedwait timeout. Ideally timedwait API should be moved to env. | |||
// details: PR #7101. | |||
void InstallTimedWaitFixCallback() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the methods that use std::numeric_limits also be moved or should be included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env.h -> limits is sufficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pdillinger has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@pdillinger merged this pull request in ac1734d. |
Summary: (a) own copy of kMicrosInSecond (b) out-of-line sync point code Pull Request resolved: #7426 Test Plan: FB internal Reviewed By: ajkr Differential Revision: D23861363 Pulled By: pdillinger fbshipit-source-id: de6b1621dca2f7391c5ff72bad04a7613dc27527
Summary: (a) own copy of kMicrosInSecond (b) out-of-line sync point code Pull Request resolved: facebook#7426 Test Plan: FB internal Reviewed By: ajkr Differential Revision: D23861363 Pulled By: pdillinger fbshipit-source-id: de6b1621dca2f7391c5ff72bad04a7613dc27527
Summary: (a) own copy of kMicrosInSecond
(b) out-of-line sync point code
Test Plan: FB internal