Skip to content

Commit fc920f8

Browse files
Merge pull request #594 from TransactionProcessing/nightlybuild/#574_figxnightlyfailure
fixed nightly build
2 parents 6446754 + 8058d48 commit fc920f8

20 files changed

+963
-1055
lines changed

TransactionProcessor.IntegrationTesting.Helpers/SpecflowExtensions.cs

Lines changed: 128 additions & 163 deletions
Large diffs are not rendered by default.

TransactionProcessor.IntegrationTesting.Helpers/TransactionProcessor.IntegrationTesting.Helpers.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="EstateManagement.Client" Version="2024.3.5" />
11-
<PackageReference Include="EstateManagement.IntegrationTesting.Helpers" Version="2024.3.5" />
10+
<PackageReference Include="EstateManagement.Client" Version="2024.4.2-build97" />
11+
<PackageReference Include="EstateManagement.IntegrationTesting.Helpers" Version="2024.4.2-build97" />
1212
<PackageReference Include="Reqnroll" Version="1.0.1" />
1313
</ItemGroup>
1414

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using NUnit.Framework;
2+
using System.Runtime.InteropServices;
3+
4+
// In SDK-style projects such as this one, several assembly attributes that were historically
5+
// defined in this file are now automatically added during build and populated with
6+
// values defined in project properties. For details of which attributes are included
7+
// and how to customise this process see: https://aka.ms/assembly-info-properties
8+
9+
10+
// Setting ComVisible to false makes the types in this assembly not visible to COM
11+
// components. If you need to access a type in this assembly from COM, set the ComVisible
12+
// attribute to true on that type.
13+
14+
[assembly: ComVisible(false)]
15+
16+
// The following GUID is for the ID of the typelib if this project is exposed to COM.
17+
18+
[assembly: Guid("25d4d6fc-b809-4acc-a910-249a03e5f07a")]
19+
[assembly: LevelOfParallelism(2)]
20+
[assembly: Parallelizable(ParallelScope.Fixtures)]

TransactionProcessor.IntegrationTests/Common/GenericSteps.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,6 @@ public GenericSteps(ScenarioContext scenarioContext,
3333
[BeforeScenario]
3434
public async Task StartSystem()
3535
{
36-
//// Initialise a logger
37-
//String scenarioName = this.ScenarioContext.ScenarioInfo.Title.Replace(" ", "");
38-
//NlogLogger logger = new NlogLogger();
39-
//logger.Initialise(LogManager.GetLogger(scenarioName), scenarioName);
40-
//LogManager.AddHiddenAssembly(typeof(NlogLogger).Assembly);
41-
42-
//this.TestingContext.DockerHelper = new DockerHelper();
43-
//this.TestingContext.DockerHelper.Logger = logger;
44-
//this.TestingContext.DockerHelper.SqlServerContainer = Setup.DatabaseServerContainer;
45-
//this.TestingContext.DockerHelper.SqlServerNetwork = Setup.DatabaseServerNetwork;
46-
//this.TestingContext.DockerHelper.DockerCredentials = Setup.DockerCredentials;
47-
//this.TestingContext.DockerHelper.SqlCredentials = Setup.SqlCredentials;
48-
//this.TestingContext.DockerHelper.SqlServerContainerName = "sharedsqlserver";
49-
50-
//this.TestingContext.DockerHelper.SetImageDetails(ContainerType.TransactionProcessor, ("transactionprocessor", false));
51-
52-
//this.TestingContext.Logger = logger;
53-
//this.TestingContext.Logger.LogInformation("About to Start Containers for Scenario Run");
54-
55-
//DockerServices dockerServices = DockerServices.CallbackHandler | DockerServices.EstateManagement | DockerServices.EventStore |
56-
// DockerServices.FileProcessor | DockerServices.MessagingService | DockerServices.SecurityService |
57-
// DockerServices.SqlServer | DockerServices.TestHost | DockerServices.TransactionProcessor |
58-
// DockerServices.TransactionProcessorAcl;
59-
60-
//await this.TestingContext.DockerHelper.StartContainersForScenarioRun(scenarioName, dockerServices).ConfigureAwait(false);
61-
//this.TestingContext.Logger.LogInformation("Containers for Scenario Run Started");
62-
6336
// Initialise a logger
6437
String scenarioName = this.ScenarioContext.ScenarioInfo.Title.Replace(" ", "");
6538
NlogLogger logger = new NlogLogger();

TransactionProcessor.IntegrationTests/Common/Product.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Collections.Generic;
55
using System.Linq;
66
using EstateManagement.DataTransferObjects;
7+
using Models;
78

89
/// <summary>
910
///

TransactionProcessor.IntegrationTests/Common/Setup.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,23 @@ public class Setup
2626
public static INetworkService DatabaseServerNetwork;
2727
public static (String usename, String password) SqlCredentials = ("sa", "thisisalongpassword123!");
2828
public static (String url, String username, String password) DockerCredentials = ("https://www.docker.com", "stuartferguson", "Sc0tland");
29-
29+
30+
static object padLock = new object(); // Object to lock on
31+
3032
public static async Task GlobalSetup(DockerHelper dockerHelper)
3133
{
3234
ShouldlyConfiguration.DefaultTaskTimeout = TimeSpan.FromMinutes(1);
3335
dockerHelper.SqlCredentials = Setup.SqlCredentials;
3436
dockerHelper.DockerCredentials = Setup.DockerCredentials;
3537
dockerHelper.SqlServerContainerName = "sharedsqlserver";
3638

37-
await Retry.For(async () => {
38-
Setup.DatabaseServerNetwork = dockerHelper.SetupTestNetwork("sharednetwork", true);
39-
Setup.DatabaseServerContainer = await dockerHelper.SetupSqlServerContainer(Setup.DatabaseServerNetwork);
40-
}, TimeSpan.FromSeconds(60));
39+
lock (Setup.padLock)
40+
{
41+
Setup.DatabaseServerNetwork = dockerHelper.SetupTestNetwork("sharednetwork");
42+
43+
dockerHelper.Logger.LogInformation("in start SetupSqlServerContainer");
44+
Setup.DatabaseServerContainer = dockerHelper.SetupSqlServerContainer(Setup.DatabaseServerNetwork).Result;
45+
}
4146
}
4247

4348
public static String GetConnectionString(String databaseName)

TransactionProcessor.IntegrationTests/Common/TransactionFee.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
using System;
44
using EstateManagement.DataTransferObjects;
5+
using Models;
56

67
/// <summary>
78
///

TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Background:
2929
| EstateName | OperatorName | RequireCustomMerchantNumber | RequireCustomTerminalNumber |
3030
| Test Estate 1 | Test Operator 1 | True | True |
3131

32+
And I have assigned the following operators to the estates
33+
| EstateName | OperatorName |
34+
| Test Estate 1 | Test Operator 1 |
35+
3236
Given I create the following merchants
3337
| MerchantName | AddressLine1 | Town | Region | Country | ContactName | EmailAddress | EstateName |
3438
| Test Merchant 1 | Address Line 1 | TestTown | Test Region | United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 1 |

0 commit comments

Comments
 (0)