Fix copyright lines
[folly.git] / folly / io / async / test / ScopedEventBaseThreadTest.cpp
index 79dbe6ff935bf4a40f8c8af5d663749c683ec71a..d224fcdbf9c53a67984cf99167285104686ee109 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2015-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <chrono>
 #include <string>
 
-#include <folly/Baton.h>
 #include <folly/Optional.h>
-#include <folly/ThreadName.h>
 #include <folly/io/async/EventBaseManager.h>
 #include <folly/portability/GTest.h>
+#include <folly/synchronization/Baton.h>
+#include <folly/system/ThreadName.h>
 
 using namespace std;
 using namespace std::chrono;
@@ -36,7 +36,7 @@ TEST_F(ScopedEventBaseThreadTest, example) {
 
   Baton<> done;
   sebt.getEventBase()->runInEventBaseThread([&] { done.post(); });
-  ASSERT_TRUE(done.timed_wait(seconds(1)));
+  ASSERT_TRUE(done.try_wait_for(seconds(1)));
 }
 
 TEST_F(ScopedEventBaseThreadTest, named_example) {
@@ -51,7 +51,7 @@ TEST_F(ScopedEventBaseThreadTest, named_example) {
     done.post();
   });
 
-  ASSERT_TRUE(done.timed_wait(seconds(1)));
+  ASSERT_TRUE(done.try_wait_for(seconds(1)));
   if (createdThreadName) {
     ASSERT_EQ(kThreadName.toString(), createdThreadName.value());
   }