Timeout test
@akociubinski found problem while creating haf-based functional tests for account history.
It seems that:
-
if
postgrest
is queried and after prepare networks:- minimum half-secnd sleep is applied and any account is queried test always pass
- some operation is applied (tested on
create_operation
) test always pass - existing account is queried test randomly pass
- non-existing account is queried test fail
-
if
postgrest
is not queried, checks are done via api node (rocksdb), test always pass -
if
postgrest
is not queried, checks are done via direct postgres sql query, test always pass
test fail has following symptoms:
- core test pass (assertion pass and no exception is thrown during query)
- during test teardown, Api Node does not close (exceed 10s timeout and is closed via
SIGTERM
, which invoke warning which is treated as error)
infrstructure:
NetworkA:
- InitNode
- WitnessNode
NetworkB:
- WitnessNode1
- ApiNode with sql_serializer
(InitNode, WitnessNode0, WitnessNode1) -> ApiNode -> haf (postgres) -> HAfAH (postgrest)
Notes:
- it seems that adding some delay after
prepare_networks
with sleep or pushing some transaction eliminates problem with non-closing Api node - in logs of Api Node it is possible to find line with interrupt signal log
Edited by Krzysztof Mochocki