gpr_time_init() for windows tests
diff --git a/test/core/census/log_test.c b/test/core/census/log_test.c
index 054b897..089bd3b 100644
--- a/test/core/census/log_test.c
+++ b/test/core/census/log_test.c
@@ -180,8 +180,9 @@
/* Ran out of log space. Sleep for a bit and let the reader catch up.
This should never happen for circular logs. */
if (VERBOSE) {
- printf(" Writer stalled due to out-of-space: %d out of %d written\n",
- records_written, args->num_records);
+ printf(
+ " Writer %d stalled due to out-of-space: %d out of %d written\n",
+ args->index, records_written, args->num_records);
}
gpr_sleep_until(GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10));
}
@@ -189,7 +190,7 @@
/* Done. Decrement count and signal. */
gpr_mu_lock(args->mu);
(*args->count)--;
- gpr_cv_broadcast(args->done);
+ gpr_cv_signal(args->done);
if (VERBOSE) {
printf(" Writer %d done\n", args->index);
}
@@ -242,7 +243,7 @@
}
/* Done */
args->running = 0;
- gpr_cv_broadcast(args->done);
+ gpr_cv_signal(args->done);
if (VERBOSE) {
printf(" Reader: records: %d, iterations: %d\n", records_read,
num_iterations);
@@ -568,6 +569,7 @@
int main(int argc, char** argv) {
grpc_test_init(argc, argv);
+ gpr_time_init();
srand((unsigned)gpr_now(GPR_CLOCK_REALTIME).tv_nsec);
test_invalid_record_size();
test_end_write_with_different_size();