mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-10 07:36:13 +01:00
Fix race conditions in minting tests (#1043)
There was a race conditions between the database storing the mint quote and the fake wallet paying the invoice of a yet not existing mint quote Add a delay of seconds before paying all invoices To recreate the slow conditions that would make our database slower than the external Fakewallet in Linux ``` sudo tc qdisc add dev lo root netem delay 200ms 50ms ionice -c3 nix develop -i -L .#stable --command just itest-payment-processor FAKEWALLET ``` To reset ``` sudo tc qdisc del dev lo root ```
This commit is contained in:
@@ -33,7 +33,7 @@ where
|
||||
fee_reserve,
|
||||
HashMap::default(),
|
||||
HashSet::default(),
|
||||
0,
|
||||
2,
|
||||
CurrencyUnit::Sat,
|
||||
);
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ pub async fn create_and_start_test_mint() -> Result<Mint> {
|
||||
fee_reserve.clone(),
|
||||
HashMap::default(),
|
||||
HashSet::default(),
|
||||
0,
|
||||
2,
|
||||
CurrencyUnit::Sat,
|
||||
);
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
fee_reserve,
|
||||
HashMap::default(),
|
||||
HashSet::default(),
|
||||
0,
|
||||
2,
|
||||
cashu::CurrencyUnit::Sat,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user