Skip to content

Commit 52e6d1f

Browse files
Merge pull request #45 from TransactionProcessing/task/#43_reduceeventsize
Event Size reduced
2 parents b0b0994 + b32d101 commit 52e6d1f

File tree

9 files changed

+15
-53
lines changed

9 files changed

+15
-53
lines changed

MessagingService.Client/MessagingService.Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="ClientProxyBase" Version="1.0.3.1" />
9+
<PackageReference Include="ClientProxyBase" Version="1.0.3.3" />
1010
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
1111
</ItemGroup>
1212

MessagingService.EmailAggregate.Tests/MessagingService.EmailAggregate.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
11-
<PackageReference Include="Shared.EventStore" Version="1.0.3.1" />
11+
<PackageReference Include="Shared.EventStore" Version="1.0.3.3" />
1212
<PackageReference Include="Shouldly" Version="4.0.3" />
1313
<PackageReference Include="xunit" Version="2.4.1" />
1414
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">

MessagingService.EmailMessage.DomainEvents/MessagingService.EmailMessage.DomainEvents.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Shared" Version="1.0.3.1" />
9-
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.3.1" />
8+
<PackageReference Include="Shared" Version="1.0.3.3" />
9+
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.3.3" />
1010
</ItemGroup>
1111

1212
</Project>

MessagingService.EmailMessageAggregate/MessagingService.EmailMessageAggregate.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Shared" Version="1.0.3.1" />
9-
<PackageReference Include="Shared.EventStore" Version="1.0.3.1" />
8+
<PackageReference Include="Shared" Version="1.0.3.3" />
9+
<PackageReference Include="Shared.EventStore" Version="1.0.3.3" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

MessagingService.IntegrationTests/Common/DockerHelper.cs

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ public override async Task StartContainersForScenarioRun(String scenarioName)
129129
this.EventStoreContainerName = $"eventstore{testGuid:N}";
130130
this.MessagingServiceContainerName = $"messagingservice{testGuid:N}";
131131

132+
String eventStoreAddress = $"http://{this.EventStoreContainerName}";
133+
132134
(String, String, String) dockerCredentials = ("https://www.docker.com", "stuartferguson", "Sc0tland");
133135

134136
INetworkService testNetwork = DockerHelper.SetupTestNetwork();
135137
this.TestNetworks.Add(testNetwork);
136138
IContainerService eventStoreContainer =
137-
DockerHelper.SetupEventStoreContainer(this.EventStoreContainerName, this.Logger, "eventstore/eventstore:20.6.0-buster-slim", testNetwork, traceFolder, usesEventStore2006OrLater:true);
139+
DockerHelper.SetupEventStoreContainer(this.EventStoreContainerName, this.Logger, "eventstore/eventstore:20.10.0-buster-slim", testNetwork, traceFolder, true);
138140

139141
IContainerService securityServiceContainer = DockerHelper.SetupSecurityServiceContainer(this.SecurityServiceContainerName,
140142
this.Logger,
@@ -153,7 +155,7 @@ public override async Task StartContainersForScenarioRun(String scenarioName)
153155
traceFolder,
154156
dockerCredentials,
155157
this.SecurityServiceContainerName,
156-
this.EventStoreContainerName,
158+
eventStoreAddress,
157159
("serviceClient", "Secret1"));
158160

159161
this.Containers.AddRange(new List<IContainerService>
@@ -202,46 +204,6 @@ public override async Task StopContainersForScenarioRun()
202204
}
203205
}
204206

205-
public const int MessagingServiceDockerPort = 5006;
206-
public static IContainerService SetupMessagingServiceContainer(String containerName,
207-
ILogger logger,
208-
String imageName,
209-
List<INetworkService> networkServices,
210-
String hostFolder,
211-
(String URL, String UserName, String Password)? dockerCredentials,
212-
String securityServiceContainerName,
213-
String eventStoreContainerName,
214-
(String clientId, String clientSecret) clientDetails,
215-
Boolean forceLatestImage = false,
216-
Int32 securityServicePort = DockerHelper.SecurityServiceDockerPort)
217-
{
218-
logger.LogInformation("About to Start Messaging Service Container");
219-
220-
List<String> environmentVariables = new List<String>();
221-
environmentVariables.Add($"EventStoreSettings:ConnectionString=https://{eventStoreContainerName}:{DockerHelper.EventStoreHttpDockerPort}");
222-
environmentVariables.Add($"AppSettings:SecurityService=http://{securityServiceContainerName}:{securityServicePort}");
223-
environmentVariables.Add($"SecurityConfiguration:Authority=http://{securityServiceContainerName}:{securityServicePort}");
224-
environmentVariables.Add($"urls=http://*:{DockerHelper.MessagingServiceDockerPort}");
225-
environmentVariables.Add("AppSettings:EmailProxy=Integration");
226-
environmentVariables.Add("AppSettings:SMSProxy=Integration");
227-
228-
ContainerBuilder messagingServiceContainer = new Builder().UseContainer().WithName(containerName).WithEnvironment(environmentVariables.ToArray())
229-
.UseImage(imageName, forceLatestImage).ExposePort(DockerHelper.MessagingServiceDockerPort)
230-
.UseNetwork(networkServices.ToArray()).Mount(hostFolder, "/home", MountType.ReadWrite);
231-
232-
if (dockerCredentials.HasValue)
233-
{
234-
messagingServiceContainer.WithCredential(dockerCredentials.Value.URL, dockerCredentials.Value.UserName, dockerCredentials.Value.Password);
235-
}
236-
237-
// Now build and return the container
238-
IContainerService builtContainer = messagingServiceContainer.Build().Start().WaitForPort($"{DockerHelper.MessagingServiceDockerPort}/tcp", 30000);
239-
240-
logger.LogInformation("Messaging Service Container Started");
241-
242-
return builtContainer;
243-
}
244-
245207
#endregion
246208
}
247209
}

MessagingService.IntegrationTests/MessagingService.IntegrationTests.csproj

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

99
<ItemGroup>
10-
<PackageReference Include="ClientProxyBase" Version="1.0.3.1" />
10+
<PackageReference Include="ClientProxyBase" Version="1.0.3.3" />
1111
<PackageReference Include="Ductus.FluentDocker" Version="2.7.3" />
1212
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
1313
<PackageReference Include="SecurityService.Client" Version="1.0.5" />
14-
<PackageReference Include="Shared.IntegrationTesting" Version="1.0.3.1" />
14+
<PackageReference Include="Shared.IntegrationTesting" Version="1.0.3.3" />
1515
<PackageReference Include="Shouldly" Version="4.0.3" />
1616
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.5.14" />
1717
<PackageReference Include="SpecFlow.xUnit" Version="3.5.14" />

MessagingService.SMSMessage.DomainEvents/MessagingService.SMSMessage.DomainEvents.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.3.1" />
8+
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.3.3" />
99
</ItemGroup>
1010

1111
</Project>

MessagingService.SMSMessageAggregate/MessagingService.SMSMessageAggregate.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Shared.EventStore" Version="1.0.3.1" />
8+
<PackageReference Include="Shared.EventStore" Version="1.0.3.3" />
99
</ItemGroup>
1010

1111
<ItemGroup>

MessagingService/MessagingService.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.2" />
1212
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.2" />
1313
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
14-
<PackageReference Include="Shared" Version="1.0.3.1" />
14+
<PackageReference Include="Shared" Version="1.0.3.3" />
1515
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.2.0" />
1616
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="4.2.0" />
1717
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />

0 commit comments

Comments
 (0)