aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/fling
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/fling')
-rw-r--r--test/core/fling/BUILD12
-rw-r--r--test/core/fling/client.cc (renamed from test/core/fling/client.c)4
-rw-r--r--test/core/fling/fling_stream_test.cc (renamed from test/core/fling/fling_stream_test.c)10
-rw-r--r--test/core/fling/fling_test.cc (renamed from test/core/fling/fling_test.c)16
-rw-r--r--test/core/fling/server.cc (renamed from test/core/fling/server.c)4
5 files changed, 23 insertions, 23 deletions
diff --git a/test/core/fling/BUILD b/test/core/fling/BUILD
index 27b2b5bec6..268e94aacc 100644
--- a/test/core/fling/BUILD
+++ b/test/core/fling/BUILD
@@ -23,8 +23,8 @@ load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_cc_binary(
name = "client",
testonly = 1,
- srcs = ["client.c"],
- language = "C",
+ srcs = ["client.cc"],
+ language = "C++",
deps = [
"//:gpr",
"//:grpc",
@@ -37,8 +37,8 @@ grpc_cc_binary(
grpc_cc_binary(
name = "server",
testonly = 1,
- srcs = ["server.c"],
- language = "C",
+ srcs = ["server.cc"],
+ language = "C++",
deps = [
"//:gpr",
"//:grpc",
@@ -50,7 +50,7 @@ grpc_cc_binary(
grpc_cc_test(
name = "fling",
- srcs = ["fling_test.c"],
+ srcs = ["fling_test.cc"],
data = [
":client",
":server",
@@ -66,7 +66,7 @@ grpc_cc_test(
grpc_cc_test(
name = "fling_stream",
- srcs = ["fling_stream_test.c"],
+ srcs = ["fling_stream_test.cc"],
data = [
":client",
":server",
diff --git a/test/core/fling/client.c b/test/core/fling/client.cc
index 80d3793c98..64d1dc5089 100644
--- a/test/core/fling/client.c
+++ b/test/core/fling/client.cc
@@ -151,10 +151,10 @@ int main(int argc, char** argv) {
int payload_size = 1;
int secure = 0;
- char* target = "localhost:443";
+ const char* target = "localhost:443";
gpr_cmdline* cl;
grpc_event event;
- char* scenario_name = "ping-pong-request";
+ const char* scenario_name = "ping-pong-request";
scenario sc = {NULL, NULL, NULL};
gpr_timers_set_log_filename("latency_trace.fling_client.txt");
diff --git a/test/core/fling/fling_stream_test.c b/test/core/fling/fling_stream_test.cc
index 1f7d7d7e6b..620427e12a 100644
--- a/test/core/fling/fling_stream_test.c
+++ b/test/core/fling/fling_stream_test.cc
@@ -44,9 +44,9 @@ int main(int argc, char** argv) {
/* start the server */
gpr_asprintf(&args[0], "%s/fling_server%s", root,
gpr_subprocess_binary_extension());
- args[1] = "--bind";
+ args[1] = const_cast<char*>("--bind");
gpr_join_host_port(&args[2], "::", port);
- args[3] = "--no-secure";
+ args[3] = const_cast<char*>("--no-secure");
svr = gpr_subprocess_create(4, (const char**)args);
gpr_free(args[0]);
gpr_free(args[2]);
@@ -54,10 +54,10 @@ int main(int argc, char** argv) {
/* start the client */
gpr_asprintf(&args[0], "%s/fling_client%s", root,
gpr_subprocess_binary_extension());
- args[1] = "--target";
+ args[1] = const_cast<char*>("--target");
gpr_join_host_port(&args[2], "127.0.0.1", port);
- args[3] = "--scenario=ping-pong-stream";
- args[4] = "--no-secure";
+ args[3] = const_cast<char*>("--scenario=ping-pong-stream");
+ args[4] = const_cast<char*>("--no-secure");
args[5] = 0;
cli = gpr_subprocess_create(6, (const char**)args);
gpr_free(args[0]);
diff --git a/test/core/fling/fling_test.c b/test/core/fling/fling_test.cc
index ce5efb0336..1d4263ab01 100644
--- a/test/core/fling/fling_test.c
+++ b/test/core/fling/fling_test.cc
@@ -26,9 +26,9 @@
#include "src/core/lib/support/string.h"
#include "test/core/util/port.h"
-int main(int argc, char** argv) {
- char* me = argv[0];
- char* lslash = strrchr(me, '/');
+int main(int argc, const char** argv) {
+ const char* me = argv[0];
+ const char* lslash = strrchr(me, '/');
char root[1024];
int port = grpc_pick_unused_port_or_die();
char* args[10];
@@ -44,9 +44,9 @@ int main(int argc, char** argv) {
/* start the server */
gpr_asprintf(&args[0], "%s/fling_server%s", root,
gpr_subprocess_binary_extension());
- args[1] = "--bind";
+ args[1] = const_cast<char*>("--bind");
gpr_join_host_port(&args[2], "::", port);
- args[3] = "--no-secure";
+ args[3] = const_cast<char*>("--no-secure");
svr = gpr_subprocess_create(4, (const char**)args);
gpr_free(args[0]);
gpr_free(args[2]);
@@ -54,10 +54,10 @@ int main(int argc, char** argv) {
/* start the client */
gpr_asprintf(&args[0], "%s/fling_client%s", root,
gpr_subprocess_binary_extension());
- args[1] = "--target";
+ args[1] = const_cast<char*>("--target");
gpr_join_host_port(&args[2], "127.0.0.1", port);
- args[3] = "--scenario=ping-pong-request";
- args[4] = "--no-secure";
+ args[3] = const_cast<char*>("--scenario=ping-pong-request");
+ args[4] = const_cast<char*>("--no-secure");
args[5] = 0;
cli = gpr_subprocess_create(6, (const char**)args);
gpr_free(args[0]);
diff --git a/test/core/fling/server.c b/test/core/fling/server.cc
index e284a61bcb..4dfb30f107 100644
--- a/test/core/fling/server.c
+++ b/test/core/fling/server.cc
@@ -177,7 +177,7 @@ int main(int argc, char** argv) {
int shutdown_finished = 0;
int secure = 0;
- char* addr = NULL;
+ const char* addr = NULL;
char* fake_argv[1];
@@ -248,7 +248,7 @@ int main(int argc, char** argv) {
gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
gpr_time_from_micros(1000000, GPR_TIMESPAN)),
NULL);
- s = ev.tag;
+ s = static_cast<call_state*>(ev.tag);
switch (ev.type) {
case GRPC_OP_COMPLETE:
switch ((intptr_t)s) {