blob: bae4e62e633d5ee378dba22d15008f3a4c71351e [file] [log] [blame]
#ifndef CHROMECAST_CAST_CORE_GRPC_TEST_UTILS_H_
#define CHROMECAST_CAST_CORE_GRPC_TEST_UTILS_H_
#include "base/time/time.h"
#include "chromecast/cast_core/grpc/grpc_server.h"
namespace cast {
namespace test {
// Stops the gRPC server in a separate task runner to avoid blocking the main
// test thread, and keep latter's run loop spinning. The process will crash
// in case the |timeout| is reached as such case clearly points to a bug in
// reactor handling.
void StopGrpcServer(utils::GrpcServer& server, const base::TimeDelta& timeout);
} // namespace test
} // namespace cast
#endif // CHROMECAST_CAST_CORE_GRPC_TEST_UTILS_H_