Run reliable tests, remove the docker build

This commit is contained in:
nicolas.dorier 2018-10-28 21:19:18 +09:00
parent 7f16aa8c7e
commit 0cbe36c048
2 changed files with 7 additions and 3 deletions

View file

@ -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:

View file

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