diff options
author | vjpai <vpai@google.com> | 2016-06-23 13:18:50 -0700 |
---|---|---|
committer | vjpai <vpai@google.com> | 2016-06-23 13:18:50 -0700 |
commit | fcb98a578cb6b359e4fd26fb618578def4d8193d (patch) | |
tree | 4961ea2f1dfbe90d968a9895d9385c3a21ed048a /test | |
parent | a12276932da60bab9a0feff0589965ec1f08e88f (diff) |
Add NextMessageSize method to all readable streams as an upper-bound
on the actual message size.
Rename Size of FCUnary to NextMessageSize for consistency
Diffstat (limited to 'test')
-rw-r--r-- | test/cpp/end2end/mock_test.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index 0ace5d9418..744a7cd9eb 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -31,6 +31,7 @@ * */ +#include <climits> #include <thread> #include <grpc++/channel.h> @@ -63,6 +64,7 @@ class MockClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> { public: void WaitForInitialMetadata() GRPC_OVERRIDE {} + uint32_t NextMessageSize() GRPC_OVERRIDE {return UINT_MAX;} bool Read(R* msg) GRPC_OVERRIDE { return true; } bool Write(const W& msg) GRPC_OVERRIDE { return true; } bool WritesDone() GRPC_OVERRIDE { return true; } @@ -74,6 +76,7 @@ class MockClientReaderWriter<EchoRequest, EchoResponse> GRPC_FINAL public: MockClientReaderWriter() : writes_done_(false) {} void WaitForInitialMetadata() GRPC_OVERRIDE {} + uint32_t NextMessageSize() GRPC_OVERRIDE {return UINT_MAX;} bool Read(EchoResponse* msg) GRPC_OVERRIDE { if (writes_done_) return false; msg->set_message(last_message_); |