diff --git a/util/thread_local_test.cc b/util/thread_local_test.cc index 3fc5bc288..737a2654f 100644 --- a/util/thread_local_test.cc +++ b/util/thread_local_test.cc @@ -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