proxygen
ByteEventTrackerTest.cpp File Reference

Go to the source code of this file.

Classes

class  MockByteEventTrackerCallback
 
class  ByteEventTrackerTest
 

Functions

 TEST_F (ByteEventTrackerTest, Ping)
 
 TEST_F (ByteEventTrackerTest, Ttlb)
 

Function Documentation

TEST_F ( ByteEventTrackerTest  ,
Ping   
)

Definition at line 56 of file ByteEventTrackerTest.cpp.

References testing::_, callback_, EXPECT_CALL, and proxygen::getCurrentTime().

56  {
57  byteEventTracker_->addPingByteEvent(10, proxygen::getCurrentTime(), 0);
58  EXPECT_CALL(callback_, onPingReplyLatency(_));
59  byteEventTracker_->processByteEvents(byteEventTracker_, 10);
60 }
std::chrono::time_point< ClockType > getCurrentTime()
Definition: Time.h:41
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
folly::Function< void()> callback_
TEST_F ( ByteEventTrackerTest  ,
Ttlb   
)

Definition at line 62 of file ByteEventTrackerTest.cpp.

References testing::_, callback_, EXPECT_CALL, and transport_.

62  {
63  byteEventTracker_->addLastByteEvent(&txn_, 10);
64  EXPECT_CALL(transportCallback_, headerBytesGenerated(_)); // sendAbort calls?
65  txn_.sendAbort(); // put it in a state for detach
66  EXPECT_CALL(transportCallback_, lastByteFlushed());
67  EXPECT_CALL(callback_, onLastByteEvent(_, _, _));
68  EXPECT_CALL(transport_, detach(_));
69  byteEventTracker_->processByteEvents(byteEventTracker_, 10);
70 }
AsyncFizzClient::UniquePtr transport_
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
folly::Function< void()> callback_