logging: improve the AsyncFileWriter flush test()
authorAdam Simpkins <simpkins@fb.com>
Thu, 22 Jun 2017 03:38:47 +0000 (20:38 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 22 Jun 2017 03:50:27 +0000 (20:50 -0700)
commit00ff5917775f9b58a04f74835585cbb32e306289
treec92af6c5a6f656a06eb9e5e0aa9b9fd4a27a5144
parent53f2f752563152c9b10cfe36030aa871927f795a
logging: improve the AsyncFileWriter flush test()

Summary:
This test has run into occasional failures on continuous build test runs.
Unfortunately when something goes wrong it crashes in the std::thread
destructor due to this thread still being joinable when it is destroyed, which
hides information about what actually failed in the test.

This updates the test to immediately detach the thread, so that on error we
will be able see the real failure reason.

This also increases the size of the message that we write, which will hopefully
help ensure that this write always blocks.

Reviewed By: wez

Differential Revision: D5295574

fbshipit-source-id: ea8cfa855613398f88f9f982c600ec661018a31c
folly/experimental/logging/test/AsyncFileWriterTest.cpp