chenBright commented on code in PR #3493:
URL: https://github.com/apache/brpc/pull/3493#discussion_r3949208646


##########
test/brpc_streaming_rpc_unittest.cpp:
##########
@@ -1249,6 +1249,83 @@ class MyServiceWithMismatchedExtraStreamIds : public 
test::EchoService {
     int _adjustment;
 };
 
+class MyServiceWithStreamCountLimit : public test::EchoService {
+public:
+    void Echo(::google::protobuf::RpcController* controller,
+              const ::test::EchoRequest* request,
+              ::test::EchoResponse* response,
+              ::google::protobuf::Closure* done) override {
+        brpc::ClosureGuard done_guard(done);
+        brpc::Controller* cntl = static_cast<brpc::Controller*>(controller);
+        response->set_message(request->message());
+
+        brpc::StreamIds response_streams;
+        accept_result.store(
+            brpc::StreamAccept(response_streams, *cntl, nullptr),
+            std::memory_order_release);
+        accepted_streams.store(
+            response_streams.size(), std::memory_order_release);
+    }
+
+    std::atomic<int> accept_result{0};
+    std::atomic<size_t> accepted_streams{0};
+};
+
+TEST_F(StreamingRpcTest, limit_streams_accepted_per_request) {

Review Comment:
   @wasphin This test case sometimes hangs.
   
   
https://github.com/apache/brpc/actions/runs/34106462745/job/101692505463?pr=3525
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to