Fix LITE build thread_local_test
Summary: Recent change break thread_local_test by introducing exception, which is disabled in LITE build. Fix it by disabling exception handling in LITE build. Test Plan: Build with both of LITE and non-LITE Reviewers: anthony, IslamAbdelRahman, yhchiang, kradhakrishnan, andrewkr Reviewed By: andrewkr Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D54513
This commit is contained in:
parent
0914f0ca55
commit
c7f1a8a468
@ -497,14 +497,18 @@ TEST_F(ThreadLocalTest, DISABLED_MainThreadDiesFirst) {
|
|||||||
// Triggers the initialization of singletons.
|
// Triggers the initialization of singletons.
|
||||||
Env::Default();
|
Env::Default();
|
||||||
|
|
||||||
|
#ifndef ROCKSDB_LITE
|
||||||
try {
|
try {
|
||||||
|
#endif // ROCKSDB_LITE
|
||||||
std::thread th(&AccessThreadLocal, nullptr);
|
std::thread th(&AccessThreadLocal, nullptr);
|
||||||
th.detach();
|
th.detach();
|
||||||
TEST_SYNC_POINT("MainThreadDiesFirst:End");
|
TEST_SYNC_POINT("MainThreadDiesFirst:End");
|
||||||
|
#ifndef ROCKSDB_LITE
|
||||||
} catch (const std::system_error& ex) {
|
} catch (const std::system_error& ex) {
|
||||||
std::cerr << "Start thread: " << ex.code() << std::endl;
|
std::cerr << "Start thread: " << ex.code() << std::endl;
|
||||||
ASSERT_TRUE(false);
|
ASSERT_TRUE(false);
|
||||||
}
|
}
|
||||||
|
#endif // ROCKSDB_LITE
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace rocksdb
|
} // namespace rocksdb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user