From c86c92200c331f0099ab95edd35b9f73c177b72b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 27 Nov 2022 21:43:55 +0100 Subject: -db tests pass again --- src/exchangedb/test_exchangedb_by_j.c | 58 ++++++++++++++++------------------- 1 file changed, 26 insertions(+), 32 deletions(-) (limited to 'src/exchangedb/test_exchangedb_by_j.c') diff --git a/src/exchangedb/test_exchangedb_by_j.c b/src/exchangedb/test_exchangedb_by_j.c index b2f6ddeb5..43f471671 100644 --- a/src/exchangedb/test_exchangedb_by_j.c +++ b/src/exchangedb/test_exchangedb_by_j.c @@ -33,7 +33,7 @@ static int result; */ #define FAILIF(cond) \ do { \ - if (! (cond)) {break;} \ + if (! (cond)) {break;} \ GNUNET_break (0); \ goto drop; \ } while (0) @@ -83,21 +83,14 @@ run (void *cls) } (void) plugin->drop_tables (plugin->cls); if (GNUNET_OK != - plugin->create_tables (plugin->cls)) + plugin->create_tables (plugin->cls, + true, + num_partitions)) { GNUNET_break (0); result = 77; goto cleanup; } - if (GNUNET_OK != - plugin->setup_partitions (plugin->cls, - num_partitions)) - { - GNUNET_break (0); - result = 77; - goto cleanup; - } - for (unsigned int i = 0; i< 7; i++) { static unsigned int batches[] = {1, 1, 2, 4, 16, 64, 256}; @@ -114,28 +107,28 @@ run (void *cls) &value)); now = GNUNET_TIME_absolute_get (); ts = GNUNET_TIME_timestamp_get (); - for (unsigned int r=0;r<10;r++) + for (unsigned int r = 0; r<10; r++) { - plugin->start_read_committed (plugin->cls, - "test_by_j"); - - for (unsigned int k = 0; kbatch_reserves_in_insert (plugin->cls, - reserves, - batch_size, - results)); - - plugin->commit (plugin->cls); + plugin->start_read_committed (plugin->cls, + "test_by_j"); + + for (unsigned int k = 0; kbatch_reserves_in_insert (plugin->cls, + reserves, + batch_size, + results)); + + plugin->commit (plugin->cls); } duration = GNUNET_TIME_absolute_get_duration (now); fprintf (stdout, @@ -201,4 +194,5 @@ main (int argc, return result; } + /* end of test_exchangedb_by_j.c */ -- cgit v1.2.3