diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-03-13 15:19:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-03-13 15:19:47 +0100 |
commit | e05ce36f301030feaa64c76bbfea24e34e05c496 (patch) | |
tree | ae0ff819a09961e934c59ece7e4d3513c982e49a | |
parent | 9c20b62eb965c2b8a9e94f56283d5671e37bc447 (diff) | |
download | exchange-e05ce36f301030feaa64c76bbfea24e34e05c496.tar.xz |
implement test mode in taler-exchange-transfer
-rw-r--r-- | src/exchange/taler-exchange-transfer.c | 13 | ||||
-rwxr-xr-x | src/exchange/test_taler_exchange_httpd_afl.sh | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-transfer.c b/src/exchange/taler-exchange-transfer.c index e8c0929be..781e1834f 100644 --- a/src/exchange/taler-exchange-transfer.c +++ b/src/exchange/taler-exchange-transfer.c @@ -447,9 +447,16 @@ run_transfers (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "No more pending wire transfers, going idle\n"); GNUNET_assert (NULL == task); - task = GNUNET_SCHEDULER_add_delayed (aggregator_idle_sleep_interval, - &run_transfers, - NULL); + if (GNUNET_YES == test_mode) + { + GNUNET_SCHEDULER_shutdown (); + } + else + { + task = GNUNET_SCHEDULER_add_delayed (aggregator_idle_sleep_interval, + &run_transfers, + NULL); + } return; case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: /* should be impossible */ diff --git a/src/exchange/test_taler_exchange_httpd_afl.sh b/src/exchange/test_taler_exchange_httpd_afl.sh index 84c4a326d..2d183d11b 100755 --- a/src/exchange/test_taler_exchange_httpd_afl.sh +++ b/src/exchange/test_taler_exchange_httpd_afl.sh @@ -39,7 +39,7 @@ PREFIX= #PREFIX="valgrind --leak-check=yes --track-fds=yes --error-exitcode=1 --log-file=valgrind.%p" # Setup keys. taler-exchange-keyup -c test_taler_exchange_httpd.conf -# Setup database (just to be sure) +# Setup database taler-exchange-dbinit -c test_taler_exchange_httpd.conf &> /dev/null # Only log hard errors, we expect lots of warnings... export GNUNET_FORCE_LOG=";;;;ERROR" |