use stderr buffering for "+trace" windows tests

pull/17611/head
Jan Tattermusch 6 years ago
parent 12aae4f7bb
commit 80e2022cbe
  1. 9
      test/core/end2end/fixtures/h2_full+trace.cc
  2. 9
      test/core/end2end/fixtures/h2_sockpair+trace.cc

@ -113,6 +113,15 @@ int main(int argc, char** argv) {
g_fixture_slowdown_factor = 10; g_fixture_slowdown_factor = 10;
#endif #endif
#ifdef GPR_WINDOWS
/* on Windows, writing logs to stderr is very slow
when stderr is redirected to a disk file.
The "trace" tests fixtures generates large amount
of logs, so setting a buffer for stderr prevents certain
test cases from timing out. */
setvbuf(stderr, NULL, _IOLBF, 1024);
#endif
grpc::testing::TestEnvironment env(argc, argv); grpc::testing::TestEnvironment env(argc, argv);
grpc_end2end_tests_pre_init(); grpc_end2end_tests_pre_init();
grpc_init(); grpc_init();

@ -140,6 +140,15 @@ int main(int argc, char** argv) {
g_fixture_slowdown_factor = 10; g_fixture_slowdown_factor = 10;
#endif #endif
#ifdef GPR_WINDOWS
/* on Windows, writing logs to stderr is very slow
when stderr is redirected to a disk file.
The "trace" tests fixtures generates large amount
of logs, so setting a buffer for stderr prevents certain
test cases from timing out. */
setvbuf(stderr, NULL, _IOLBF, 1024);
#endif
grpc::testing::TestEnvironment env(argc, argv); grpc::testing::TestEnvironment env(argc, argv);
grpc_end2end_tests_pre_init(); grpc_end2end_tests_pre_init();
grpc_init(); grpc_init();

Loading…
Cancel
Save