proxygen
|
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <boost/filesystem.hpp>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
#include <folly/File.h>
#include <folly/FileUtil.h>
#include <folly/experimental/TestUtil.h>
#include <wangle/util/FilePoller.h>
#include <folly/Singleton.h>
Go to the source code of this file.
Classes | |
class | FilePollerTest |
struct | UpdateSyncState |
class | TestFile |
class | NoDiskPoller |
struct | PollerWithState |
Functions | |
void | updateModifiedTime (const std::string &fileName, bool forward=true) |
TEST_F (FilePollerTest, TestUpdateFile) | |
TEST_F (FilePollerTest, TestUpdateFileBackwards) | |
TEST_F (FilePollerTest, TestCreateFile) | |
TEST_F (FilePollerTest, TestDeleteFile) | |
TEST_F (FilePollerTest, TestTwoUpdatesAndDelete) | |
TEST_F (FilePollerTest, TestFileCreatedLate) | |
TEST_F (FilePollerTest, TestMultiplePollers) | |
TEST (FilePoller, TestFork) | |
TEST | ( | FilePoller | , |
TestFork | |||
) |
Definition at line 233 of file FilePollerTest.cpp.
References ASSERT_NO_FATAL_FAILURE, folly::SingletonVault::destroyInstances(), folly::SingletonVault::singleton(), TestFile::update(), and PollerWithState::waitForUpdate().
TEST_F | ( | FilePollerTest | , |
TestUpdateFile | |||
) |
Definition at line 58 of file FilePollerTest.cpp.
References wangle::FilePoller::addFileToTrack(), ASSERT_TRUE, folly::Baton< MayBlock, Atom >::post(), folly::Baton< MayBlock, Atom >::try_wait_for(), and updateModifiedTime().
TEST_F | ( | FilePollerTest | , |
TestUpdateFileBackwards | |||
) |
Definition at line 72 of file FilePollerTest.cpp.
References wangle::FilePoller::addFileToTrack(), ASSERT_TRUE, folly::Baton< MayBlock, Atom >::post(), folly::Baton< MayBlock, Atom >::try_wait_for(), and updateModifiedTime().
TEST_F | ( | FilePollerTest | , |
TestCreateFile | |||
) |
Definition at line 86 of file FilePollerTest.cpp.
References wangle::FilePoller::addFileToTrack(), ASSERT_TRUE, folly::Baton< MayBlock, Atom >::post(), and folly::Baton< MayBlock, Atom >::try_wait_for().
TEST_F | ( | FilePollerTest | , |
TestDeleteFile | |||
) |
Definition at line 101 of file FilePollerTest.cpp.
References wangle::FilePoller::addFileToTrack(), ASSERT_FALSE, folly::Baton< MayBlock, Atom >::post(), and folly::Baton< MayBlock, Atom >::try_wait_for().
TEST_F | ( | FilePollerTest | , |
TestTwoUpdatesAndDelete | |||
) |
Definition at line 189 of file FilePollerTest.cpp.
References ASSERT_NO_FATAL_FAILURE, TestFile::update(), and PollerWithState::waitForUpdate().
TEST_F | ( | FilePollerTest | , |
TestFileCreatedLate | |||
) |
Definition at line 203 of file FilePollerTest.cpp.
References ASSERT_NO_FATAL_FAILURE, TestFile::update(), and PollerWithState::waitForUpdate().
TEST_F | ( | FilePollerTest | , |
TestMultiplePollers | |||
) |
Definition at line 212 of file FilePollerTest.cpp.
References ASSERT_NO_FATAL_FAILURE, PollerWithState::poller, TestFile::update(), and PollerWithState::waitForUpdate().
void updateModifiedTime | ( | const std::string & | fileName, |
bool | forward = true |
||
) |