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:
C
2025-09-08 09:02:45 -03:00
committed by GitHub
parent 4363d14281
commit b5b8ee557c
3 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ where
fee_reserve,
HashMap::default(),
HashSet::default(),
0,
2,
CurrencyUnit::Sat,
);

View File

@@ -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,
);

View File

@@ -122,7 +122,7 @@ async fn main() -> anyhow::Result<()> {
fee_reserve,
HashMap::default(),
HashSet::default(),
0,
2,
cashu::CurrencyUnit::Sat,
);