diff options
author | Florian Dold <florian@dold.me> | 2023-04-21 22:02:34 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-04-21 22:02:40 +0200 |
commit | e81ae0f3e5a510424076b611ac32385057cbdaed (patch) | |
tree | 1583ae253ec979f6dfdef5cd4581db6a7d33818a /packages/taler-harness/src | |
parent | fc2adae6bd34164b4a13b270be4c585f090afb61 (diff) | |
download | wallet-core-e81ae0f3e5a510424076b611ac32385057cbdaed.tar.xz |
wallet-harness: make sure events are not lost in deposit test
Diffstat (limited to 'packages/taler-harness/src')
-rw-r--r-- | packages/taler-harness/src/harness/harness.ts | 1 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-deposit.ts | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index 840149e7c..0a898414d 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -2062,6 +2062,7 @@ export class WalletService { [ "--wallet-db", dbPath, + "-LDEBUG", // FIXME: Make this configurable? "--no-throttle", // FIXME: Optionally do throttling for some tests? "advanced", "serve", diff --git a/packages/taler-harness/src/integrationtests/test-deposit.ts b/packages/taler-harness/src/integrationtests/test-deposit.ts index 1b46daf5f..6aa086107 100644 --- a/packages/taler-harness/src/integrationtests/test-deposit.ts +++ b/packages/taler-harness/src/integrationtests/test-deposit.ts @@ -45,9 +45,17 @@ export async function runDepositTest(t: GlobalTestState) { await withdrawalResult.withdrawalFinishedCond; - const depositDone = await walletClient.waitForNotificationCond( + const dgIdResp = await walletClient.client.call( + WalletApiOperation.GenerateDepositGroupTxId, + {}, + ); + + const depositTxId = dgIdResp.transactionId; + + const depositDone = walletClient.waitForNotificationCond( (n) => n.type == NotificationType.TransactionStateTransition && + n.transactionId == depositTxId && n.newTxState == TransactionState.Done, ); @@ -56,9 +64,14 @@ export async function runDepositTest(t: GlobalTestState) { { amount: "TESTKUDOS:10", depositPaytoUri: getPayto("foo"), + transactionId: depositTxId, }, ); + t.assertDeepEqual(depositGroupResult.transactionId, depositTxId); + + await depositDone; + const transactions = await walletClient.client.call( WalletApiOperation.GetTransactions, {}, |