aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2015-01-23 07:44:02 -0800
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2015-01-23 07:44:02 -0800
commitac139dead15bf9cb8da75340c6fb93225a11ef7c (patch)
tree20db86faa1cb4bcef299af17a93de7f7d6e44fe6 /test
parentbdc52f6d3197f72cd495048d93f2a3a10cff3b38 (diff)
parente86076159ce9239479e454b2d2cc4b7858c48479 (diff)
Merge pull request #153 from ctiller/windows-fixes
Windows fixes
Diffstat (limited to 'test')
-rw-r--r--test/core/end2end/cq_verifier.c12
-rw-r--r--test/core/transport/transport_end2end_tests.c5
-rw-r--r--test/core/util/test_config.c2
3 files changed, 11 insertions, 8 deletions
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index 9fa513126f..7a7f197907 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -56,8 +56,8 @@
typedef struct metadata {
size_t count;
size_t cap;
- const char **keys;
- const char **values;
+ char **keys;
+ char **values;
} metadata;
/* details what we expect to find on a single event - and forms a linked
@@ -409,11 +409,11 @@ static metadata *metadata_from_args(va_list args) {
if (md->cap == md->count) {
md->cap = GPR_MAX(md->cap + 1, md->cap * 3 / 2);
- md->keys = gpr_realloc(md->keys, sizeof(const char *) * md->cap);
- md->values = gpr_realloc(md->values, sizeof(const char *) * md->cap);
+ md->keys = gpr_realloc(md->keys, sizeof(char *) * md->cap);
+ md->values = gpr_realloc(md->values, sizeof(char *) * md->cap);
}
- md->keys[md->count] = key;
- md->values[md->count] = value;
+ md->keys[md->count] = (char *)key;
+ md->values[md->count] = (char *)value;
md->count++;
}
}
diff --git a/test/core/transport/transport_end2end_tests.c b/test/core/transport/transport_end2end_tests.c
index 712081bc8a..5d26ef53b9 100644
--- a/test/core/transport/transport_end2end_tests.c
+++ b/test/core/transport/transport_end2end_tests.c
@@ -129,7 +129,8 @@ static void expect_metadata(test_stream *s, int from_client, const char *key,
/* Convert some number of seconds into a gpr_timespec that many seconds in the
future */
static gpr_timespec deadline_from_seconds(double deadline_seconds) {
- return gpr_time_add(gpr_now(), gpr_time_from_micros(deadline_seconds * 1e6));
+ return gpr_time_add(gpr_now(),
+ gpr_time_from_micros((long)(deadline_seconds * 1e6)));
}
/* Init a test_user_data instance */
@@ -573,7 +574,7 @@ static grpc_transport_setup_result setup_client_transport(
name - the name of this test */
static void begin_test(test_fixture *f, grpc_transport_test_config *config,
const char *name) {
- gpr_timespec timeout = gpr_time_add(gpr_now(), gpr_time_from_micros(100e6));
+ gpr_timespec timeout = gpr_time_add(gpr_now(), gpr_time_from_seconds(100));
gpr_log(GPR_INFO, "BEGIN: %s/%s", name, config->name);
diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c
index 6df86b593f..5f3b55da75 100644
--- a/test/core/util/test_config.c
+++ b/test/core/util/test_config.c
@@ -48,8 +48,10 @@ static int seed(void) { return _getpid(); }
#endif
void grpc_test_init(int argc, char **argv) {
+#ifndef GPR_WIN32
/* disable SIGPIPE */
signal(SIGPIPE, SIG_IGN);
+#endif
/* seed rng with pid, so we don't end up with the same random numbers as a
concurrently running test binary */
srand(seed());