Yash Tibrewal 7 anos atrás
pai
commit
a55d60056b

+ 2 - 3
test/cpp/end2end/interceptors_util.h

@@ -175,10 +175,9 @@ void MakeCallbackCall(const std::shared_ptr<Channel>& channel) {
 }
 }
 
 
 bool CheckMetadata(const std::multimap<grpc::string_ref, grpc::string_ref>& map,
 bool CheckMetadata(const std::multimap<grpc::string_ref, grpc::string_ref>& map,
-                   string key, string value) {
+                   const string& key, const string& value) {
   for (const auto& pair : map) {
   for (const auto& pair : map) {
-    if (pair.first.starts_with("testkey") &&
-        pair.second.starts_with("testvalue")) {
+    if (pair.first.starts_with(key) && pair.second.starts_with(value)) {
       return true;
       return true;
     }
     }
   }
   }

+ 2 - 0
test/cpp/interop/client_helper.h

@@ -19,10 +19,12 @@
 #ifndef GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H
 #ifndef GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H
 #define GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H
 #define GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H
 
 
+#include <functional>
 #include <memory>
 #include <memory>
 #include <unordered_map>
 #include <unordered_map>
 
 
 #include <grpcpp/channel.h>
 #include <grpcpp/channel.h>
+#include <grpcpp/client_context.h>
 
 
 #include "src/core/lib/surface/call_test_only.h"
 #include "src/core/lib/surface/call_test_only.h"