diff options
author | 2015-01-21 15:49:28 -0800 | |
---|---|---|
committer | 2015-01-21 15:49:28 -0800 | |
commit | 0c0b60c322a92d8c72c14a1b1cf057bcc5c16cc4 (patch) | |
tree | 8a65a23c769dd2abfcc1e7f8373f72866514ee7c /test | |
parent | dedbae744a6c8d816daeb42b1b080398d1b9d2c5 (diff) |
Add platform ifdefs, fix up some MSVC warnings
Diffstat (limited to 'test')
-rw-r--r-- | test/core/transport/transport_end2end_tests.c | 5 | ||||
-rw-r--r-- | test/core/util/test_config.c | 2 |
2 files changed, 5 insertions, 2 deletions
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()); |