You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR #403 designs a series of fuzzing tests for ledger rpc using the protest API. A fuzzing test fails on CI (and not locally) probably due to concurrency issues.
How to reproduce the error
In test_rpc.rs in the test proptest_get_batches, the following test fails on CI but not locally
// TODO: Solve this test TestExpect{data:format!(r#"{{"jsonrpc":"2.0","method":"ledger_getBatches","params":[[{random_batch_num}], "Full"],"id":1}}"#),expected:format!(r#"{{"jsonrpc":"2.0","result":[{{"hash":"0x{batch_hash}","tx_range":{{"start":{first_tx_num},"end":{last_tx_num}}},"txs":[{tx_full_data}],"custom_receipt":{batch_receipt}}}],"id":1}}"#)},
Possible causes
It is pretty hard to track down the cause of failure for this test. The CI fails randomly a variable number of test cases, this test also randomly passes.
The failure is due to the fact that the list of transaction hashes expected does not match the list of transaction hashes delivered by rpc. The order of the transactions is modified and sometimes new hashes appear randomly to the transaction list.
It seems that this is probably a concurrency issue in the way rpc handles incoming transactions concurrently. The handlers and the code for the test are all mono threaded. It may also be an error related to CI configuration. This test sends a significant number of requests concurrently to RPC.
The text was updated successfully, but these errors were encountered:
Context
The PR #403 designs a series of fuzzing tests for ledger rpc using the protest API. A fuzzing test fails on CI (and not locally) probably due to concurrency issues.
How to reproduce the error
In test_rpc.rs in the test
proptest_get_batches
, the following test fails on CI but not locallyPossible causes
It is pretty hard to track down the cause of failure for this test. The CI fails randomly a variable number of test cases, this test also randomly passes.
The failure is due to the fact that the list of transaction hashes expected does not match the list of transaction hashes delivered by rpc. The order of the transactions is modified and sometimes new hashes appear randomly to the transaction list.
It seems that this is probably a concurrency issue in the way rpc handles incoming transactions concurrently. The handlers and the code for the test are all mono threaded. It may also be an error related to CI configuration. This test sends a significant number of requests concurrently to RPC.
The text was updated successfully, but these errors were encountered: