report ore precisely where commands went wrong
This commit is contained in:
parent
e3f7083b3e
commit
c51b19512b
@ -1,5 +1,5 @@
|
||||
{
|
||||
"url": "payto://x-taler-bank/localhost:8082/2",
|
||||
"salt": "S8SBYSZE4CAWMJRWGMS25XYVSVM6KXN4BJYZ34M975MPDDXZ01WAZEMB2139G8VVD8K6FVCR3GSZKNGEQ76XX27HQSM1PPX54SCFYER",
|
||||
"master_sig": "J0DHVTAPFB3MY6RRVBX0WGKK7K32XZ7HPKR5JBB6GSQ29AXXFTWM8A1P7STBGKT14YQMYAM4X4EM8GD4FKNDR1MVGK6ANMQYCP9WE0G"
|
||||
"salt": "08QX35Z1DA877F14N865D7GKEQ6B4M1HPQHHHZFAWN6Y64AZ6Y34NJEM6W0H7PES2B3V3QPGGXYDWCJ7181JK55ESB5FTK99Q1PF88G",
|
||||
"master_sig": "KAAGPE2A9GD1N0EFQHRAXNCV0EVENS51SJAX91403F8DTPJZS1BFHA330QEZQP235R1XAND6HT1AVK4FVAC5H2BFSAWCVF0AGTS3T38"
|
||||
}
|
@ -741,7 +741,8 @@ main (int argc,
|
||||
exchange_url);
|
||||
GNUNET_free (exchange_url);
|
||||
duration = GNUNET_TIME_absolute_get_duration (start_time);
|
||||
|
||||
if (GNUNET_OK == result)
|
||||
{
|
||||
fprintf (stdout,
|
||||
"Executed (W=%u, D=%u, R~=%5.2f) * P=%u, operations in %s\n",
|
||||
howmany_coins,
|
||||
@ -757,5 +758,6 @@ main (int argc,
|
||||
(GNUNET_TIME_relative_divide (duration,
|
||||
howmany_coins * howmany_clients),
|
||||
GNUNET_YES));
|
||||
}
|
||||
return (GNUNET_OK == result) ? 0 : result;
|
||||
}
|
||||
|
@ -33,10 +33,14 @@
|
||||
*/
|
||||
struct BatchState
|
||||
{
|
||||
/* CMDs batch. */
|
||||
/**
|
||||
* CMDs batch.
|
||||
*/
|
||||
struct TALER_TESTING_Command *batch;
|
||||
|
||||
/* Internal comand pointer. */
|
||||
/**
|
||||
* Internal comand pointer.
|
||||
*/
|
||||
int batch_ip;
|
||||
};
|
||||
|
||||
@ -56,7 +60,6 @@ batch_run (void *cls,
|
||||
struct BatchState *bs = cls;
|
||||
|
||||
bs->batch_ip++;
|
||||
|
||||
TALER_LOG_DEBUG ("Running batched command: %s\n",
|
||||
bs->batch[bs->batch_ip].label);
|
||||
|
||||
@ -113,8 +116,8 @@ batch_traits (void *cls,
|
||||
const char *trait,
|
||||
unsigned int index)
|
||||
{
|
||||
#define CURRENT_CMD_INDEX 0
|
||||
#define BATCH_INDEX 1
|
||||
#define CURRENT_CMD_INDEX 0
|
||||
#define BATCH_INDEX 1
|
||||
|
||||
struct BatchState *bs = cls;
|
||||
|
||||
|
@ -121,9 +121,11 @@ deposit_cb (void *cls,
|
||||
if (ds->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
ds->is->commands[ds->is->ip].label);
|
||||
ds->is->commands[ds->is->ip].label,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (obj, stderr, 0);
|
||||
TALER_TESTING_interpreter_fail (ds->is);
|
||||
return;
|
||||
|
@ -142,9 +142,11 @@ payback_cb (void *cls,
|
||||
if (ps->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
cmd->label);
|
||||
cmd->label,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (full_response, stderr, 0);
|
||||
fprintf (stderr, "\n");
|
||||
TALER_TESTING_interpreter_fail (is);
|
||||
|
@ -232,9 +232,11 @@ reveal_cb (void *cls,
|
||||
if (rrs->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
rrs->is->commands[rrs->is->ip].label);
|
||||
rrs->is->commands[rrs->is->ip].label,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (full_response, stderr, 0);
|
||||
TALER_TESTING_interpreter_fail (rrs->is);
|
||||
return;
|
||||
@ -400,9 +402,11 @@ link_cb (void *cls,
|
||||
if (rls->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
link_cmd->label);
|
||||
link_cmd->label,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (full_response, stderr, 0);
|
||||
TALER_TESTING_interpreter_fail (rls->is);
|
||||
return;
|
||||
@ -431,8 +435,11 @@ link_cb (void *cls,
|
||||
if (num_coins != *num_fresh_coins)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected number of fresh coins: %d vs %d\n",
|
||||
num_coins, *num_fresh_coins);
|
||||
"Unexpected number of fresh coins: %d vs %d in %s:%u\n",
|
||||
num_coins,
|
||||
*num_fresh_coins,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
TALER_TESTING_interpreter_fail (rls->is);
|
||||
return;
|
||||
}
|
||||
@ -626,9 +633,11 @@ melt_cb (void *cls,
|
||||
if (rms->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
rms->is->commands[rms->is->ip].label);
|
||||
rms->is->commands[rms->is->ip].label,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (full_response, stderr, 0);
|
||||
TALER_TESTING_interpreter_fail (rms->is);
|
||||
return;
|
||||
|
@ -105,9 +105,11 @@ refund_cb (void *cls,
|
||||
if (rs->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
refund_cmd->label);
|
||||
refund_cmd->label,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (obj, stderr, 0);
|
||||
TALER_TESTING_interpreter_fail (rs->is);
|
||||
return;
|
||||
|
@ -95,8 +95,10 @@ reserve_status_cb
|
||||
if (ss->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected HTTP response code: %d\n",
|
||||
http_status);
|
||||
"Unexpected HTTP response code: %d in %s:%u\n",
|
||||
http_status,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
TALER_TESTING_interpreter_fail (ss->is);
|
||||
return;
|
||||
}
|
||||
|
@ -184,9 +184,11 @@ deposit_wtid_cb
|
||||
if (tts->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
cmd->label);
|
||||
cmd->label,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (json, stderr, 0);
|
||||
TALER_TESTING_interpreter_fail (is);
|
||||
return;
|
||||
@ -527,9 +529,11 @@ track_transfer_cb
|
||||
if (tts->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
cmd->label);
|
||||
cmd->label,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (json, stderr, 0);
|
||||
TALER_TESTING_interpreter_fail (is);
|
||||
return;
|
||||
|
@ -120,9 +120,11 @@ reserve_withdraw_cb (void *cls,
|
||||
if (ws->expected_response_code != http_status)
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Unexpected response code %u to command %s\n",
|
||||
"Unexpected response code %u to command %s in %s:%u\n",
|
||||
http_status,
|
||||
TALER_TESTING_interpreter_get_current_label (is));
|
||||
TALER_TESTING_interpreter_get_current_label (is),
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
json_dumpf (full_response,
|
||||
stderr,
|
||||
0);
|
||||
|
@ -944,11 +944,11 @@ main (int argc,
|
||||
}
|
||||
|
||||
mhd
|
||||
= MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_PIPE_FOR_SHUTDOWN | MHD_USE_DEBUG | MHD_USE_DUAL_STACK, // | MHD_USE_INTERNAL_POLLING_THREAD,
|
||||
= MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_PIPE_FOR_SHUTDOWN | MHD_USE_DEBUG | MHD_USE_DUAL_STACK | MHD_USE_INTERNAL_POLLING_THREAD,
|
||||
(-1 == fh) ? serve_port : 0,
|
||||
NULL, NULL,
|
||||
&handle_mhd_request, NULL,
|
||||
/* MHD_OPTION_THREAD_POOL_SIZE, (unsigned int) 8, */
|
||||
MHD_OPTION_THREAD_POOL_SIZE, (unsigned int) 16,
|
||||
MHD_OPTION_LISTEN_SOCKET, fh,
|
||||
MHD_OPTION_EXTERNAL_LOGGER, &handle_mhd_logs, NULL,
|
||||
MHD_OPTION_NOTIFY_COMPLETED, &handle_mhd_completion_callback, NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user