aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/interop/server_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/interop/server_helper.h')
-rw-r--r--test/cpp/interop/server_helper.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/cpp/interop/server_helper.h b/test/cpp/interop/server_helper.h
index bdbea8f653..ab5de07c0e 100644
--- a/test/cpp/interop/server_helper.h
+++ b/test/cpp/interop/server_helper.h
@@ -52,6 +52,12 @@ namespace interop {
extern gpr_atm g_got_sigint;
+struct ServerStartedCondition {
+ std::mutex mutex;
+ std::condition_variable condition;
+ bool server_started = false;
+};
+
/// Run gRPC interop server using port FLAGS_port.
///
/// \param creds The credentials associated with the server.
@@ -61,11 +67,11 @@ void RunServer(std::shared_ptr<ServerCredentials> creds);
///
/// \param creds The credentials associated with the server.
/// \param port Port to use for the server.
-/// \param server_started_condition (optional) Condition variable used to notify
-/// when the server has started.
+/// \param server_started_condition (optional) Struct holding mutex, condition
+/// variable, and condition used to notify when the server has started.
void RunServer(std::shared_ptr<ServerCredentials> creds,
int port,
- std::condition_variable *server_started_condition);
+ ServerStartedCondition *server_started_condition);
} // namespace interop
} // namespace testing