Add MSAN workaround to TestEnvironment

pull/23696/head
Esun Kim 5 years ago
parent 4f2c74450f
commit 3cdd6ccb26
  1. 9
      test/core/util/test_config.cc

@ -413,6 +413,15 @@ TestEnvironment::~TestEnvironment() {
break;
}
}
if (BuiltUnderMsan()) {
// This is a workaround for MSAN. MSAN doesn't like having shutdown thread
// running. Although the code above waits until shutdown is done, chances
// are that thread itself is still alive. To workaround this problem, this
// is going to wait for 0.5 sec to give a chance to the shutdown thread to
// exit. https://github.com/grpc/grpc/issues/23695
gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
gpr_time_from_millis(500, GPR_TIMESPAN)));
}
gpr_log(GPR_INFO, "TestEnvironment ends");
}

Loading…
Cancel
Save