#include <folly/ExceptionWrapper.h>
#include <folly/SocketAddress.h>
#include <folly/ExceptionWrapper.h>
#include <folly/SocketAddress.h>
+#include <folly/experimental/TestUtil.h>
#include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/AsyncServerSocket.h>
#include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/AsyncServerSocket.h>
#include <folly/io/async/AsyncSocket.h>
wcb_->setSocket(socket_);
// Write back the same data.
wcb_->setSocket(socket_);
// Write back the same data.
- socket_->write(wcb_, currentBuffer.buffer, len);
+ folly::test::msvcSuppressAbortOnInvalidParams([&] {
+ socket_->write(wcb_, currentBuffer.buffer, len);
+ });
if (wcb_->state == STATE_FAILED) {
setState(STATE_SUCCEEDED);
if (wcb_->state == STATE_FAILED) {
setState(STATE_SUCCEEDED);
#include <folly/io/async/AsyncTimeout.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/AsyncTimeout.h>
#include <folly/io/async/EventBase.h>
+#include <folly/experimental/TestUtil.h>
#include <folly/io/IOBuf.h>
#include <folly/io/async/test/AsyncSocketTest.h>
#include <folly/io/async/test/Util.h>
#include <folly/io/IOBuf.h>
#include <folly/io/async/test/AsyncSocketTest.h>
#include <folly/io/async/test/Util.h>
acceptedSocket.reset();
// Test that server socket was closed
acceptedSocket.reset();
// Test that server socket was closed
- ssize_t sz = read(fd, simpleBuf, simpleBufLength);
- ASSERT_EQ(sz, -1);
- ASSERT_EQ(errno, 9);
+ folly::test::msvcSuppressAbortOnInvalidParams([&] {
+ ssize_t sz = read(fd, simpleBuf, simpleBufLength);
+ ASSERT_EQ(sz, -1);
+ ASSERT_EQ(errno, EBADF);
+ });