From 2d91b5de4031ecd5e82c720ba9d39c677f5888b1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 7 Aug 2015 07:39:27 -0700 Subject: [PATCH] Only slow down tracing tests if stdout isatty --- .../end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c b/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c index 6d2361b783a..9d798ad1d20 100644 --- a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c +++ b/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c @@ -148,7 +148,11 @@ int main(int argc, char **argv) { /* force tracing on, with a value to force many code paths in trace.c to be taken */ gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); +#ifdef GPR_POSIX_SOCKET + g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10.0 : 1.0; +#else g_fixture_slowdown_factor = 10.0; +#endif grpc_test_init(argc, argv); grpc_init();