Merge pull request #20040 from rmstar/timertestem

Skip timer test when running under event manager
pull/20045/head
Mark D. Roth 6 years ago committed by GitHub
commit 8ae549431c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      test/cpp/common/timer_test.cc

@ -27,6 +27,10 @@
#include "src/core/lib/iomgr/timer_manager.h"
#include "test/core/util/test_config.h"
#ifdef GRPC_POSIX_SOCKET
#include "src/core/lib/iomgr/ev_posix.h"
#endif
// MAYBE_SKIP_TEST is a macro to determine if this particular test configuration
// should be skipped based on a decision made at SetUp time.
#define MAYBE_SKIP_TEST \
@ -39,9 +43,17 @@
class TimerTest : public ::testing::Test {
protected:
void SetUp() override {
// Skip test if slowdown factor > 1.
do_not_test_ = (grpc_test_slowdown_factor() != 1);
grpc_init();
// Skip test if slowdown factor > 1, or we are
// using event manager.
#ifdef GRPC_POSIX_SOCKET
if (grpc_test_slowdown_factor() != 1 ||
grpc_event_engine_run_in_background()) {
#else
if (grpc_test_slowdown_factor() != 1) {
#endif
do_not_test_ = true;
}
}
void TearDown() override { grpc_shutdown_blocking(); }

Loading…
Cancel
Save