Skip to content

Commit

Permalink
Fix LITE build thread_local_test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
siying committed Feb 19, 2016
1 parent 0914f0c commit c7f1a8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/thread_local_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -497,14 +497,18 @@ TEST_F(ThreadLocalTest, DISABLED_MainThreadDiesFirst) {
// Triggers the initialization of singletons.
Env::Default();

#ifndef ROCKSDB_LITE
try {
#endif // ROCKSDB_LITE
std::thread th(&AccessThreadLocal, nullptr);
th.detach();
TEST_SYNC_POINT("MainThreadDiesFirst:End");
#ifndef ROCKSDB_LITE
} catch (const std::system_error& ex) {
std::cerr << "Start thread: " << ex.code() << std::endl;
ASSERT_TRUE(false);
}
#endif // ROCKSDB_LITE
}

} // namespace rocksdb
Expand Down

0 comments on commit c7f1a8a

Please sign in to comment.