mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Run tests in parallel
This commit is contained in:
parent
35aad4ebf9
commit
20f32e94a8
12 changed files with 24 additions and 1 deletions
|
@ -30,6 +30,7 @@ using WalletSettingsViewModel = BTCPayServer.Models.StoreViewModels.WalletSettin
|
|||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class AltcoinTests : UnitTestBase
|
||||
{
|
||||
public const int TestTimeout = 60_000;
|
||||
|
|
|
@ -11,6 +11,7 @@ using Xunit.Abstractions;
|
|||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Trait("Selenium", "Selenium")]
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class CheckoutUITests : UnitTestBase
|
||||
{
|
||||
public const int TestTimeout = TestUtils.TestTimeout;
|
||||
|
|
13
BTCPayServer.Tests/CollectionDefinitions.cs
Normal file
13
BTCPayServer.Tests/CollectionDefinitions.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[CollectionDefinition(nameof(NonParallelizableCollectionDefinition), DisableParallelization = true)]
|
||||
public class NonParallelizableCollectionDefinition
|
||||
{
|
||||
}
|
||||
}
|
|
@ -31,6 +31,7 @@ using JsonReader = Newtonsoft.Json.JsonReader;
|
|||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class GreenfieldAPITests : UnitTestBase
|
||||
{
|
||||
public const int TestTimeout = TestUtils.TestTimeout;
|
||||
|
|
|
@ -6,6 +6,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class LanguageServiceTests : UnitTestBase
|
||||
{
|
||||
public const int TestTimeout = TestUtils.TestTimeout;
|
||||
|
|
|
@ -10,6 +10,7 @@ using static BTCPayServer.Tests.UnitTest1;
|
|||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class POSTests : UnitTestBase
|
||||
{
|
||||
public POSTests(ITestOutputHelper helper) : base(helper)
|
||||
|
|
|
@ -13,6 +13,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class PSBTTests : UnitTestBase
|
||||
{
|
||||
public PSBTTests(ITestOutputHelper helper) : base(helper)
|
||||
|
|
|
@ -33,6 +33,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class PayJoinTests : UnitTestBase
|
||||
{
|
||||
public const int TestTimeout = 60_000;
|
||||
|
|
|
@ -17,6 +17,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class PaymentRequestTests : UnitTestBase
|
||||
{
|
||||
public PaymentRequestTests(ITestOutputHelper helper) : base(helper)
|
||||
|
|
|
@ -43,6 +43,7 @@ using CreateInvoiceRequest = BTCPayServer.Lightning.Charge.CreateInvoiceRequest;
|
|||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Trait("Selenium", "Selenium")]
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class ChromeTests : UnitTestBase
|
||||
{
|
||||
private const int TestTimeout = TestUtils.TestTimeout;
|
||||
|
|
|
@ -74,6 +74,7 @@ using RatesViewModel = BTCPayServer.Models.StoreViewModels.RatesViewModel;
|
|||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
[Collection(nameof(NonParallelizableCollectionDefinition))]
|
||||
public class UnitTest1 : UnitTestBase
|
||||
{
|
||||
public const int LongRunningTestTimeout = 60_000; // 60s
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parallelizeTestCollections": false,
|
||||
"maxParallelThreads": 4,
|
||||
"longRunningTestSeconds": 60,
|
||||
"diagnosticMessages": true,
|
||||
"methodDisplay": "method"
|
||||
|
|
Loading…
Add table
Reference in a new issue