Ejemplo n.º 1
0
// Tests scenario where multiple writers and a single reader are using a log
// that is configured to discard old records.
void test_multiple_writers(void) {
  printf("Starting test: multiple writers\n");
  const int circular = 0;
  setup_test(circular);
  multiple_writers_single_reader(circular);
  census_log_shutdown();
}
Ejemplo n.º 2
0
/* Tests scenario where multiple writers and a single reader are using a log
   that is configured to discard old records. */
void test_multiple_writers_circular_log(void) {
  const int circular = 1;
  printf("Starting test: multiple writers circular log\n");
  setup_test(circular);
  multiple_writers_single_reader(circular);
  census_log_shutdown();
}
Ejemplo n.º 3
0
// Repeat the straddling records and multiple writers tests with a small log.
void test_small_log(void) {
  printf("Starting test: small log\n");
  const int circular = 0;
  census_log_initialize(0, circular);
  size_t log_size = census_log_remaining_space();
  GPR_ASSERT(log_size > 0);
  fill_log(log_size, 0, circular);
  census_log_shutdown();
  census_log_initialize(0, circular);
  multiple_writers_single_reader(circular);
  census_log_shutdown();
}