mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-12 10:30:47 +01:00
Add debug flaky test statement
This commit is contained in:
parent
b9e3686fcf
commit
10bb75ce0e
1 changed files with 5 additions and 2 deletions
|
@ -3876,8 +3876,9 @@ namespace BTCPayServer.Tests
|
||||||
Assert.True( settings.ProcessNewPayoutsInstantly);
|
Assert.True( settings.ProcessNewPayoutsInstantly);
|
||||||
|
|
||||||
var pluginHookService = tester.PayTester.GetService<IPluginHookService>();
|
var pluginHookService = tester.PayTester.GetService<IPluginHookService>();
|
||||||
var beforeHookTcs = new TaskCompletionSource();
|
var beforeHookTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
var afterHookTcs = new TaskCompletionSource();
|
var afterHookTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
|
TestLogs.LogInformation("Adding hook...");
|
||||||
pluginHookService.ActionInvoked += (sender, tuple) =>
|
pluginHookService.ActionInvoked += (sender, tuple) =>
|
||||||
{
|
{
|
||||||
switch (tuple.hook)
|
switch (tuple.hook)
|
||||||
|
@ -3908,7 +3909,9 @@ namespace BTCPayServer.Tests
|
||||||
PaymentMethod = "BTC",
|
PaymentMethod = "BTC",
|
||||||
Destination = (await adminClient.GetOnChainWalletReceiveAddress(admin.StoreId, "BTC", true)).Address,
|
Destination = (await adminClient.GetOnChainWalletReceiveAddress(admin.StoreId, "BTC", true)).Address,
|
||||||
});
|
});
|
||||||
|
TestLogs.LogInformation("Waiting before hook...");
|
||||||
await beforeHookTcs.Task.WaitAsync(TimeSpan.FromSeconds(5));
|
await beforeHookTcs.Task.WaitAsync(TimeSpan.FromSeconds(5));
|
||||||
|
TestLogs.LogInformation("Waiting before after...");
|
||||||
await afterHookTcs.Task.WaitAsync(TimeSpan.FromSeconds(5));
|
await afterHookTcs.Task.WaitAsync(TimeSpan.FromSeconds(5));
|
||||||
payouts = await adminClient.GetStorePayouts(admin.StoreId);
|
payouts = await adminClient.GetStorePayouts(admin.StoreId);
|
||||||
try
|
try
|
||||||
|
|
Loading…
Add table
Reference in a new issue