mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
Run reliable tests, remove the docker build
This commit is contained in:
parent
7f16aa8c7e
commit
0cbe36c048
2 changed files with 7 additions and 3 deletions
|
@ -5,7 +5,6 @@ jobs:
|
|||
docker_layer_caching: true
|
||||
steps:
|
||||
- checkout
|
||||
- run: docker build .
|
||||
test:
|
||||
machine: true
|
||||
steps:
|
||||
|
@ -20,6 +19,8 @@ jobs:
|
|||
sudo apt-get install dotnet-sdk-2.1
|
||||
cd BTCPayServer.Tests
|
||||
dotnet test --filter Fast=Fast
|
||||
docker-compose up -d
|
||||
dotnet test --filter Reliable=Reliable
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_test:
|
||||
|
|
|
@ -43,6 +43,7 @@ using BTCPayServer.Security;
|
|||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
using NBXplorer.DerivationStrategy;
|
||||
using NicolasDorier.RateLimits;
|
||||
using Npgsql;
|
||||
|
||||
namespace BTCPayServer.Hosting
|
||||
{
|
||||
|
@ -200,7 +201,7 @@ namespace BTCPayServer.Hosting
|
|||
|
||||
static void Retry(Action act)
|
||||
{
|
||||
CancellationTokenSource cts = new CancellationTokenSource(10000);
|
||||
CancellationTokenSource cts = new CancellationTokenSource(1000);
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
|
@ -208,7 +209,9 @@ namespace BTCPayServer.Hosting
|
|||
act();
|
||||
return;
|
||||
}
|
||||
catch when(!cts.IsCancellationRequested)
|
||||
// Starting up
|
||||
catch (PostgresException ex) when (ex.SqlState == "57P03") { Thread.Sleep(1000); }
|
||||
catch when (!cts.IsCancellationRequested)
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue