X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2Fio%2Fasync%2Ftest%2FAsyncSocketTest2.cpp;h=13f23b75d81a6be5fab18944100bb2202f5d3ed4;hp=b1f69db5d790aba182f00493e5d8c3ef9868816f;hb=5c74326fdc75ccdfc2152c15203625d8588096b6;hpb=c72b52a352357a375cfaedc7acb6b1db709a9a00 diff --git a/folly/io/async/test/AsyncSocketTest2.cpp b/folly/io/async/test/AsyncSocketTest2.cpp index b1f69db5..13f23b75 100644 --- a/folly/io/async/test/AsyncSocketTest2.cpp +++ b/folly/io/async/test/AsyncSocketTest2.cpp @@ -1177,6 +1177,13 @@ TEST(AsyncSocketTest, WriteIOBuf) { ReadCallback rcb; acceptedSocket->setReadCB(&rcb); + // Check if EOR tracking flag can be set and reset. + EXPECT_FALSE(socket->isEorTrackingEnabled()); + socket->setEorTracking(true); + EXPECT_TRUE(socket->isEorTrackingEnabled()); + socket->setEorTracking(false); + EXPECT_FALSE(socket->isEorTrackingEnabled()); + // Write a simple buffer to the socket constexpr size_t simpleBufLength = 5; char simpleBuf[simpleBufLength];