Fix test compile

reviewable/pr13109/r6
ncteisen 7 years ago
parent 756acb6893
commit 05fbb9d13d
  1. 8
      src/core/lib/debug/trace.h
  2. 12
      test/core/iomgr/timer_list_test.cc

@ -61,9 +61,8 @@ class TraceFlag {
#endif
}
private:
static void List();
// Only to be used for testing purposes. Tracers should usually be set using
// the static Set function
void set_enabled(bool enabled) {
#ifdef GRPC_THREADSAFE_TRACER
gpr_atm_no_barrier_store(&value_, enabled);
@ -72,6 +71,9 @@ class TraceFlag {
#endif
}
private:
static void List();
static TraceFlag *root_tracer_;
TraceFlag *next_tracer_;
const char *const name_;

@ -31,8 +31,8 @@
#define MAX_CB 30
grpc_core::TraceFlag grpc_timer_trace;
grpc_core::TraceFlag grpc_timer_check_trace;
extern grpc_core::TraceFlag grpc_timer_trace;
extern grpc_core::TraceFlag grpc_timer_check_trace;
static int cb_called[MAX_CB][2];
@ -48,8 +48,8 @@ static void add_test(void) {
gpr_log(GPR_INFO, "add_test");
grpc_timer_list_init(&exec_ctx);
grpc_timer_trace.value = 1;
grpc_timer_check_trace.value = 1;
grpc_timer_trace.set_enabled(1);
grpc_timer_check_trace.set_enabled(1);
memset(cb_called, 0, sizeof(cb_called));
grpc_millis start = grpc_exec_ctx_now(&exec_ctx);
@ -117,8 +117,8 @@ void destruction_test(void) {
exec_ctx.now_is_valid = true;
exec_ctx.now = 0;
grpc_timer_list_init(&exec_ctx);
grpc_timer_trace.value = 1;
grpc_timer_check_trace.value = 1;
grpc_timer_trace.set_enabled(1);
grpc_timer_check_trace.set_enabled(1);
memset(cb_called, 0, sizeof(cb_called));
grpc_timer_init(

Loading…
Cancel
Save