Add replay safety connector/handler to delay transactions scheduled on a replay-unsaf...
authorKyle Nekritz <knekritz@fb.com>
Wed, 9 Mar 2016 19:18:37 +0000 (11:18 -0800)
committerFacebook Github Bot 8 <facebook-github-bot-8-bot@fb.com>
Wed, 9 Mar 2016 19:20:21 +0000 (11:20 -0800)
Summary: This allows HTTPTransactions to be held back until the transport is replay-safe.

Reviewed By: siyengar

Differential Revision: D2974083

fb-gh-sync-id: 037b14c24a80c828a25e483b6873a8e782af0cb4
shipit-source-id: 037b14c24a80c828a25e483b6873a8e782af0cb4

folly/io/async/test/MockAsyncTransport.h

index 8b4e9228b4e55b82dd944b2ca9f01fbcab1b188b..9703f34f54d38e5e5a437e86fc847896ac31b897 100644 (file)
@@ -62,7 +62,9 @@ class MockAsyncTransport: public AsyncTransportWrapper {
   MOCK_CONST_METHOD0(isEorTrackingEnabled, bool());
   MOCK_METHOD1(setEorTracking, void(bool));
   MOCK_CONST_METHOD0(getWrappedTransport, AsyncTransportWrapper*());
-
+  MOCK_CONST_METHOD0(isReplaySafe, bool());
+  MOCK_METHOD1(setReplaySafetyCallback,
+               void(AsyncTransport::ReplaySafetyCallback*));
 };
 
 class MockReplaySafetyCallback : public AsyncTransport::ReplaySafetyCallback {