From 09c9c9622458c844f01e7eba5a625c2b42a769c1 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 13 Feb 2025 04:34:40 -0500 Subject: [PATCH 01/13] Updates Microsoft.NET.Test.SDK to v17.13.0 from v17.12.0 --- src/Dependency.Versions.props | 2 +- .../ReactiveDomain.Foundation.Tests.csproj | 2 +- .../ReactiveDomain.IdentityStorage.Tests.csproj | 2 +- .../ReactiveDomain.Messaging.Tests.csproj | 2 +- .../ReactiveDomain.Policy.Tests.csproj | 2 +- .../ReactiveDomain.PolicyStorage.Tests.csproj | 2 +- src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj | 2 +- .../ReactiveDomain.Transport.Tests.csproj | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Dependency.Versions.props b/src/Dependency.Versions.props index 41463d64..632a792d 100644 --- a/src/Dependency.Versions.props +++ b/src/Dependency.Versions.props @@ -1,6 +1,6 @@ - 2.4.1 + 1.1.0 1.0.1 12.0.2 diff --git a/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj b/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj index 376120fe..09851080 100644 --- a/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj +++ b/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj @@ -16,7 +16,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj b/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj index f584fea7..e6768d05 100644 --- a/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj +++ b/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj b/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj index 13d7a15f..84c9f035 100644 --- a/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj +++ b/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj b/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj index 38d4c103..57290d1a 100644 --- a/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj +++ b/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj b/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj index fe9e312f..abb9680d 100644 --- a/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj +++ b/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj @@ -16,7 +16,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj b/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj index 8ce6fd94..be08a724 100644 --- a/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj +++ b/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj b/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj index a76cbf88..a5a16829 100644 --- a/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj +++ b/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 7968bf0e30aa04175b65952597cd13591e70e897 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 13 Feb 2025 04:41:04 -0500 Subject: [PATCH 02/13] Changes xunit library dependency from v2.x to v3.x for ReactiveDomain.Testing class library. --- .../EventStore/StreamReaderTests.cs | 1 - .../ReactiveDomain.Testing.csproj | 10 +------- .../Specifications/TestQueueTests.cs | 25 ++++++++----------- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/ReactiveDomain.Testing/EventStore/StreamReaderTests.cs b/src/ReactiveDomain.Testing/EventStore/StreamReaderTests.cs index 5db13438..2e4bbe76 100644 --- a/src/ReactiveDomain.Testing/EventStore/StreamReaderTests.cs +++ b/src/ReactiveDomain.Testing/EventStore/StreamReaderTests.cs @@ -7,7 +7,6 @@ using System.Threading; using System.Threading.Tasks; using Xunit; -using Xunit.Abstractions; // ReSharper disable UnusedParameter.Local diff --git a/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj b/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj index be08a724..08d7d7fd 100644 --- a/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj +++ b/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj @@ -11,16 +11,8 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/ReactiveDomain.Testing/Specifications/TestQueueTests.cs b/src/ReactiveDomain.Testing/Specifications/TestQueueTests.cs index 09fd645a..f5f47d12 100644 --- a/src/ReactiveDomain.Testing/Specifications/TestQueueTests.cs +++ b/src/ReactiveDomain.Testing/Specifications/TestQueueTests.cs @@ -1,9 +1,6 @@ - - -using ReactiveDomain.Messaging; +using ReactiveDomain.Messaging; using ReactiveDomain.Messaging.Bus; using System; -using System.Threading; using System.Threading.Tasks; using Xunit; @@ -133,8 +130,8 @@ public void waiting_for_message_throws_on_clear() { using (var tq = new TestQueue(_dispatcher, new[] { typeof(Event), typeof(Command) })) { - Task.Run(() => Assert.Throws(() => tq.WaitFor(TimeSpan.FromMilliseconds(100)))) - .ContinueWith(t => tq.Clear()); + Task.Run(() => Assert.Throws(() => tq.WaitFor(TimeSpan.FromMilliseconds(100))), TestContext.Current.CancellationToken) + .ContinueWith(t => tq.Clear(), TestContext.Current.CancellationToken); tq.AssertEmpty(); } } @@ -143,8 +140,8 @@ public void waiting_for_id_throws_on_clear() { using (var tq = new TestQueue(_dispatcher, new[] { typeof(Event), typeof(Command) })) { - Task.Run(() => Assert.Throws(() => tq.WaitForMsgId(Guid.NewGuid(), TimeSpan.FromMilliseconds(100)))) - .ContinueWith(t => tq.Clear()); + Task.Run(() => Assert.Throws(() => tq.WaitForMsgId(Guid.NewGuid(), TimeSpan.FromMilliseconds(100))), TestContext.Current.CancellationToken) + .ContinueWith(t => tq.Clear(), TestContext.Current.CancellationToken); tq.AssertEmpty(); } } @@ -157,8 +154,8 @@ public void can_wait_for_a_specific_message() var evt = new TestEvent(); var evt2 = new TestEvent(); //before - var t1 = Task.Run(() => tq.WaitForMsgId(evt.MsgId, TimeSpan.FromMilliseconds(1000))); - var t2 = Task.Run(() => tq.WaitForMsgId(evt2.MsgId, TimeSpan.FromMilliseconds(1000))); + var t1 = Task.Run(() => tq.WaitForMsgId(evt.MsgId, TimeSpan.FromMilliseconds(1000)), TestContext.Current.CancellationToken); + var t2 = Task.Run(() => tq.WaitForMsgId(evt2.MsgId, TimeSpan.FromMilliseconds(1000)), TestContext.Current.CancellationToken); AssertEx.EnsureRunning(t1,t2); _dispatcher.Publish(evt); @@ -179,8 +176,8 @@ public void can_wait_for_a_specific_message_twice() using (var tq = new TestQueue(_dispatcher)) { var evt = new TestEvent(); - var t1 = Task.Run(() => tq.WaitForMsgId(evt.MsgId, TimeSpan.FromMilliseconds(1000))); - var t2 = Task.Run(() => tq.WaitForMsgId(evt.MsgId, TimeSpan.FromMilliseconds(1000))); + var t1 = Task.Run(() => tq.WaitForMsgId(evt.MsgId, TimeSpan.FromMilliseconds(1000)), TestContext.Current.CancellationToken); + var t2 = Task.Run(() => tq.WaitForMsgId(evt.MsgId, TimeSpan.FromMilliseconds(1000)), TestContext.Current.CancellationToken); tq.Handle(evt); tq.AssertNext(evt.CorrelationId) @@ -214,8 +211,8 @@ public void can_wait_for_multiple_messages_not_yet_received() var evt = new TestEvent(); var evt2 = new TestEvent(); - var t1 = Task.Run(() => tq.WaitForMsgId(evt.MsgId, TimeSpan.FromMilliseconds(200))); - var t2 = Task.Run(() => tq.WaitForMsgId(evt2.MsgId, TimeSpan.FromMilliseconds(200))); + var t1 = Task.Run(() => tq.WaitForMsgId(evt.MsgId, TimeSpan.FromMilliseconds(200)), TestContext.Current.CancellationToken); + var t2 = Task.Run(() => tq.WaitForMsgId(evt2.MsgId, TimeSpan.FromMilliseconds(200)), TestContext.Current.CancellationToken); _dispatcher.Publish(evt); _dispatcher.Publish(evt2); From d5b1d0fcf3564816689c80ced151488a9dacad4d Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 13 Feb 2025 04:54:48 -0500 Subject: [PATCH 03/13] Changes xunit dependency library from v2.x to v3.x for ReactiveDomain.Transport.Tests class library. --- .../ReactiveDomain.Transport.Tests.csproj | 10 +------ .../TcpBusClientSideTests.cs | 26 ++++++++----------- .../TcpBusServerSideTests.cs | 19 ++++++-------- 3 files changed, 20 insertions(+), 35 deletions(-) diff --git a/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj b/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj index a5a16829..82c4994c 100644 --- a/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj +++ b/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj @@ -5,16 +5,8 @@ true - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/ReactiveDomain.Transport.Tests/TcpBusClientSideTests.cs b/src/ReactiveDomain.Transport.Tests/TcpBusClientSideTests.cs index f7ee4db7..a282ddcb 100644 --- a/src/ReactiveDomain.Transport.Tests/TcpBusClientSideTests.cs +++ b/src/ReactiveDomain.Transport.Tests/TcpBusClientSideTests.cs @@ -1,15 +1,13 @@ -using System; +using Newtonsoft.Json; +using ReactiveDomain.Messaging; +using ReactiveDomain.Messaging.Bus; +using ReactiveDomain.Testing; +using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; -using System.Threading; using System.Threading.Tasks; -using Newtonsoft.Json; -using ReactiveDomain.Messaging; -using ReactiveDomain.Messaging.Bus; -using ReactiveDomain.Testing; -using ReactiveDomain.Transport.Serialization; using Xunit; namespace ReactiveDomain.Transport.Tests @@ -77,7 +75,7 @@ public TcpBusClientSideTests() } [Fact] - public void can_send_command() + public async Task can_send_command() { var handler = new WoftamCommandHandler(_longProp); _subscriptions.Add(_localBus.Subscribe(handler)); @@ -86,13 +84,12 @@ public void can_send_command() _tcpBusClientSide.Handle(MessageBuilder.New(() => new WoftamCommand(ShortProp))); // expect to receive it on the client side - var gotMessage = _tcs.Task.Wait(TimeSpan.FromMilliseconds(1000)); - Assert.True(gotMessage); - Assert.IsType(_tcs.Task.Result); + var result = await _tcs.Task.WaitAsync(TimeSpan.FromMilliseconds(1000), TestContext.Current.CancellationToken); + Assert.IsType(result); } [Fact] - public void can_handle_split_frames() // Also tests custom deserializer + public async Task can_handle_split_frames() // Also tests custom deserializer { var handler = new WoftamCommandHandler(_longProp) { ReturnCustomResponse = true }; _subscriptions.Add(_localBus.Subscribe(handler)); @@ -103,9 +100,8 @@ public void can_handle_split_frames() // Also tests custom deserializer _tcpBusClientSide.Handle(MessageBuilder.New(() => new WoftamCommand(ShortProp))); // expect to receive it on the client side - var gotMessage = _tcs.Task.Wait(TimeSpan.FromMilliseconds(1000)); - Assert.True(gotMessage); - var response = Assert.IsType(_tcs.Task.Result); + var result = await _tcs.Task.WaitAsync(TimeSpan.FromMilliseconds(1000), TestContext.Current.CancellationToken); + var response = Assert.IsType(result); Assert.Equal(_longProp, response.PropertyA); } diff --git a/src/ReactiveDomain.Transport.Tests/TcpBusServerSideTests.cs b/src/ReactiveDomain.Transport.Tests/TcpBusServerSideTests.cs index 645bad3e..58b99789 100644 --- a/src/ReactiveDomain.Transport.Tests/TcpBusServerSideTests.cs +++ b/src/ReactiveDomain.Transport.Tests/TcpBusServerSideTests.cs @@ -1,11 +1,10 @@ -using System; +using ReactiveDomain.Messaging; +using ReactiveDomain.Messaging.Bus; +using ReactiveDomain.Testing; +using System; using System.Linq; using System.Net; -using System.Threading; using System.Threading.Tasks; -using ReactiveDomain.Messaging; -using ReactiveDomain.Messaging.Bus; -using ReactiveDomain.Testing; using Xunit; namespace ReactiveDomain.Transport.Tests @@ -23,7 +22,7 @@ public class TcpBusServerSideTests private readonly TaskCompletionSource _tcs = new TaskCompletionSource(); [Fact] - public void can_handle_split_frames() + public async Task can_handle_split_frames() { // 16kb large enough to cause the transport to split up the frame. // it would be better if we did the splitting manually so we were sure it really happened. @@ -56,8 +55,7 @@ public void can_handle_split_frames() tcpBusClientSide.Handle(new WoftamEvent(prop1, prop2)); // expect to receive it in the server - var gotMessage = _tcs.Task.Wait(TimeSpan.FromMilliseconds(1000)); - Assert.True(gotMessage); + await _tcs.Task.WaitAsync(TimeSpan.FromMilliseconds(1000), TestContext.Current.CancellationToken); var evt = Assert.IsType(_tcs.Task.Result); Assert.Equal(prop1, evt.Property1); Assert.Equal(prop2, evt.Property2); @@ -67,7 +65,7 @@ public void can_handle_split_frames() } [Fact] - public void can_filter_out_message_types() + public async Task can_filter_out_message_types() { // server side var serverInbound = new QueuedHandler( @@ -94,8 +92,7 @@ public void can_filter_out_message_types() tcpBusClientSide.Handle(new WoftamCommand("abc")); // expect to receive it in the server but drop it on the floor - var gotMessage = _tcs.Task.Wait(TimeSpan.FromMilliseconds(1000)); - Assert.False(gotMessage); + _ = await Assert.ThrowsAsync(async () => await _tcs.Task.WaitAsync(TimeSpan.FromMilliseconds(1000), TestContext.Current.CancellationToken)); tcpBusClientSide.Dispose(); tcpBusServerSide.Dispose(); From 33c8bfaee46f3d8ee85406073b8fb225fa045120 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 13 Feb 2025 05:01:10 -0500 Subject: [PATCH 04/13] Changes xunit dependency library from v2.x to v3.x for ReactiveDomain.Foundation.Tests class library. --- .../ReactiveDomain.Foundation.Tests.csproj | 10 +----- ...using_listener_start_with_future_stream.cs | 4 +-- .../when_using_read_model_base.cs | 32 +++++++++---------- .../when_using_read_model_base_with_reader.cs | 32 +++++++++---------- .../when_using_snapshot_read_model.cs | 2 +- 5 files changed, 36 insertions(+), 44 deletions(-) diff --git a/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj b/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj index 09851080..7b7da604 100644 --- a/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj +++ b/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj @@ -15,16 +15,8 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/ReactiveDomain.Foundation.Tests/StreamListenerTests/when_using_listener_start_with_future_stream.cs b/src/ReactiveDomain.Foundation.Tests/StreamListenerTests/when_using_listener_start_with_future_stream.cs index e92a24c4..7fddfe53 100644 --- a/src/ReactiveDomain.Foundation.Tests/StreamListenerTests/when_using_listener_start_with_future_stream.cs +++ b/src/ReactiveDomain.Foundation.Tests/StreamListenerTests/when_using_listener_start_with_future_stream.cs @@ -42,7 +42,7 @@ public void validation_throws_on_mising_stream() new PrefixedCamelCaseStreamNameBuilder(), _eventSerializer); listener.EventStream.Subscribe(new AdHocHandler(Handle)); - Assert.Throws(() => listener.Start(missingStream, validateStream: true)); + Assert.Throws(() => listener.Start(missingStream, validateStream: true, cancelWaitToken: TestContext.Current.CancellationToken)); listener.Dispose(); } [Fact] @@ -55,7 +55,7 @@ public void can_subscribe_to_missing_stream() new PrefixedCamelCaseStreamNameBuilder(), _eventSerializer); listener.EventStream.Subscribe(new AdHocHandler(Handle)); - listener.Start(missingStream, validateStream: false); + listener.Start(missingStream, validateStream: false, cancelWaitToken: TestContext.Current.CancellationToken); Assert.True(listener.IsLive); listener.Dispose(); } diff --git a/src/ReactiveDomain.Foundation.Tests/when_using_read_model_base.cs b/src/ReactiveDomain.Foundation.Tests/when_using_read_model_base.cs index 54e45d32..ba6973df 100644 --- a/src/ReactiveDomain.Foundation.Tests/when_using_read_model_base.cs +++ b/src/ReactiveDomain.Foundation.Tests/when_using_read_model_base.cs @@ -61,7 +61,7 @@ public void can_start_streams_by_aggregate() var aggId = Guid.NewGuid(); var s1 = Namer.GenerateForAggregate(typeof(TestAggregate), aggId); AppendEvents(1, _conn, s1, 7); - Start(aggId); + Start(aggId, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 2, msg: $"Expected 2 got {Version}"); // 1 message + CatchupSubscriptionBecameLive AssertEx.IsOrBecomesTrue(() => Sum == 7); } @@ -73,7 +73,7 @@ public void can_start_streams_by_aggregate_category() AppendEvents(1, _conn, s1, 7); var s2 = Namer.GenerateForAggregate(typeof(ReadModelTestCategoryAggregate), Guid.NewGuid()); AppendEvents(1, _conn, s2, 5); - Start(null, true); + Start(null, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 3, msg: $"Expected 3 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 12); @@ -81,7 +81,7 @@ public void can_start_streams_by_aggregate_category() [Fact] public void can_read_one_stream() { - Start(_stream1); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 11, msg: $"Expected 11 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 20); //confirm checkpoints @@ -91,8 +91,8 @@ public void can_read_one_stream() [Fact] public void can_read_two_streams() { - Start(_stream1); - Start(_stream2); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); + Start(_stream2, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 22, msg: $"Expected 22 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 50); //confirm checkpoints @@ -104,25 +104,25 @@ public void can_read_two_streams() [Fact] public void can_wait_for_one_stream_to_go_live() { - Start(_stream1, null, true); + Start(_stream1, null, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 11, TimeSpan.FromMilliseconds(100), msg: $"Expected 11 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 20, 100); } [Fact] public void can_wait_for_two_streams_to_go_live() { - Start(_stream1, null, true); + Start(_stream1, null, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 11, TimeSpan.FromMilliseconds(100), msg: $"Expected 11 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 20, 150); - Start(_stream2, null, true); + Start(_stream2, null, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 21, TimeSpan.FromMilliseconds(100), msg: $"Expected 21 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 50, 150); } [Fact] public void can_listen_to_one_stream() { - Start(_stream1); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 11, msg: $"Expected 11 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 20); //add more messages @@ -137,8 +137,8 @@ public void can_listen_to_one_stream() [Fact] public void can_listen_to_two_streams() { - Start(_stream1); - Start(_stream2); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); + Start(_stream2, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.AtLeastModelVersion(this, 22, msg: $"Expected 22 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 50); //add more messages @@ -159,7 +159,7 @@ public void can_use_checkpoint_on_one_stream() var checkPoint = 8L;//Zero based, ignore the first 9 events Sum = 18; //start at the checkpoint - Start(_stream1, checkPoint); + Start(_stream1, checkPoint, cancelWaitToken: TestContext.Current.CancellationToken); //add the one recorded event AssertEx.AtLeastModelVersion(this, 2, TimeSpan.FromMilliseconds(100), msg: $"Expected 2 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 20); @@ -180,8 +180,8 @@ public void can_use_checkpoint_on_two_streams() var checkPoint1 = 8L;//Zero based, ignore the first 9 events var checkPoint2 = 5L;//Zero based, ignore the first 6 events Sum = (9 * 2) + (6 * 3); - Start(_stream1, checkPoint1); - Start(_stream2, checkPoint2); + Start(_stream1, checkPoint1, cancelWaitToken: TestContext.Current.CancellationToken); + Start(_stream2, checkPoint2, cancelWaitToken: TestContext.Current.CancellationToken); //add the recorded events 2 on stream 1 & 5 on stream 2 AssertEx.AtLeastModelVersion(this, 7, msg: $"Expected 7 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 50, msg: $"Expected 50 got {Sum}"); @@ -202,8 +202,8 @@ public void can_listen_to_the_same_stream_twice() Assert.Equal(0, Version); //weird but true //n.b. Don't do this on purpose - Start(_stream1); - Start(_stream1); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); //double events AssertEx.AtLeastModelVersion(this, 22, msg: $"Expected 22 got {Version}"); AssertEx.IsOrBecomesTrue(() => Sum == 40); diff --git a/src/ReactiveDomain.Foundation.Tests/when_using_read_model_base_with_reader.cs b/src/ReactiveDomain.Foundation.Tests/when_using_read_model_base_with_reader.cs index f8a24e6c..3420ed48 100644 --- a/src/ReactiveDomain.Foundation.Tests/when_using_read_model_base_with_reader.cs +++ b/src/ReactiveDomain.Foundation.Tests/when_using_read_model_base_with_reader.cs @@ -60,7 +60,7 @@ public void can_start_streams_by_aggregate() var aggId = Guid.NewGuid(); var s1 = Namer.GenerateForAggregate(typeof(TestAggregate), aggId); AppendEvents(1, _conn, s1, 7); - Start(aggId); + Start(aggId, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 1, 1000, msg: $"Expected 1 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 7); } @@ -72,7 +72,7 @@ public void can_start_streams_by_aggregate_category() AppendEvents(1, _conn, s1, 7); var s2 = Namer.GenerateForAggregate(typeof(ReadModelTestCategoryAggregate), Guid.NewGuid()); AppendEvents(1, _conn, s2, 5); - Start(null, true); + Start(null, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 2, 1000, msg: $"Expected 2 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 12); @@ -80,7 +80,7 @@ public void can_start_streams_by_aggregate_category() [Fact] public void can_read_one_stream() { - Start(_stream1); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 10, 1000, msg: $"Expected 10 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 20); //confirm checkpoints @@ -90,8 +90,8 @@ public void can_read_one_stream() [Fact] public void can_read_two_streams() { - Start(_stream1); - Start(_stream2); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); + Start(_stream2, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 20, 1000, msg: $"Expected 20 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 50); //confirm checkpoints @@ -103,25 +103,25 @@ public void can_read_two_streams() [Fact] public void can_wait_for_one_stream_to_go_live() { - Start(_stream1, null, true); + Start(_stream1, null, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 10, 100, msg: $"Expected 10 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 20, 100); } [Fact] public void can_wait_for_two_streams_to_go_live() { - Start(_stream1, null, true); + Start(_stream1, null, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 10, 100, msg: $"Expected 10 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 20, 100); - Start(_stream2, null, true); + Start(_stream2, null, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 20, 100, msg: $"Expected 20 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 50, 100); } [Fact] public void can_listen_to_one_stream() { - Start(_stream1); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 10, 1000, msg: $"Expected 10 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 20); //add more messages @@ -136,8 +136,8 @@ public void can_listen_to_one_stream() [Fact] public void can_listen_to_two_streams() { - Start(_stream1); - Start(_stream2); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); + Start(_stream2, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => Count == 20, 1000, msg: $"Expected 20 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 50); //add more messages @@ -159,7 +159,7 @@ public void can_use_checkpoint_on_one_stream() Count = 9; Sum = 18; //start at the checkpoint - Start(_stream1, checkPoint); + Start(_stream1, checkPoint, cancelWaitToken: TestContext.Current.CancellationToken); //add the one recorded event AssertEx.IsOrBecomesTrue(() => Count == 10, 100, msg: $"Expected 10 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 20); @@ -179,8 +179,8 @@ public void can_use_checkpoint_on_two_streams() var checkPoint2 = 5L;//Zero based, ignore the first 6 events Count = (9) + (6); Sum = (9 * 2) + (6 * 3); - Start(_stream1, checkPoint1); - Start(_stream2, checkPoint2); + Start(_stream1, checkPoint1, cancelWaitToken: TestContext.Current.CancellationToken); + Start(_stream2, checkPoint2, cancelWaitToken: TestContext.Current.CancellationToken); //add the recorded events 2 on stream 1 & 5 on stream 2 AssertEx.IsOrBecomesTrue(() => Count == 20, 1000, msg: $"Expected 20 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 50, msg: $"Expected 50 got {Sum}"); @@ -201,8 +201,8 @@ public void can_listen_to_the_same_stream_twice() Assert.Equal(0, Count); //weird but true //n.b. Don't do this on purpose - Start(_stream1); - Start(_stream1); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); + Start(_stream1, cancelWaitToken: TestContext.Current.CancellationToken); //double events AssertEx.IsOrBecomesTrue(() => Count == 20, 1000, msg: $"Expected 20 got {Count}"); AssertEx.IsOrBecomesTrue(() => Sum == 40); diff --git a/src/ReactiveDomain.Foundation.Tests/when_using_snapshot_read_model.cs b/src/ReactiveDomain.Foundation.Tests/when_using_snapshot_read_model.cs index 86e90bf2..e830180e 100644 --- a/src/ReactiveDomain.Foundation.Tests/when_using_snapshot_read_model.cs +++ b/src/ReactiveDomain.Foundation.Tests/when_using_snapshot_read_model.cs @@ -120,7 +120,7 @@ public void can_restore_state_without_checkpoints() { AssertEx.IsOrBecomesTrue(() => rm.Sum == 20); //can manually start - rm.Start(_aggId, 9, true); + rm.Start(_aggId, 9, true, cancelWaitToken: TestContext.Current.CancellationToken); AssertEx.IsOrBecomesTrue(() => rm.Count == 11, 1000); AssertEx.IsOrBecomesTrue(() => rm.Sum == 25); AppendEvents(1, _conn, _stream, 5); From 4ab936dd2f4ec2c089337d17fcf8cd09b3545ca1 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 13 Feb 2025 05:03:27 -0500 Subject: [PATCH 05/13] Changes xunit dependency library from v2.x to v3.x for ReactiveDomain.IdentityStorage.Tests class library. --- .../ReactiveDomain.IdentityStorage.Tests.csproj | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj b/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj index e6768d05..6a919031 100644 --- a/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj +++ b/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj @@ -6,16 +6,8 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + From 5a8d66ae31964431b37cdfb4631895042fd9c544 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 13 Feb 2025 05:06:58 -0500 Subject: [PATCH 06/13] Changes xunit dependency library from v2.x to v3.x for ReactiveDomain.Messaging.Tests class library. --- .../LaterServiceTests.cs | 4 ++-- .../ReactiveDomain.Messaging.Tests.csproj | 10 +--------- ...en_sending_commands_via_single_queued_dispatcher.cs | 2 +- .../when_sending_remote_handled_commands.cs | 4 ++-- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/ReactiveDomain.Messaging.Tests/LaterServiceTests.cs b/src/ReactiveDomain.Messaging.Tests/LaterServiceTests.cs index 2964ae1f..11929062 100644 --- a/src/ReactiveDomain.Messaging.Tests/LaterServiceTests.cs +++ b/src/ReactiveDomain.Messaging.Tests/LaterServiceTests.cs @@ -120,7 +120,7 @@ public void DelayPublishLoadTest() { delay.Handle(new DelaySendEnvelope(timeSource, TimeSpan.FromMilliseconds(50), new TestMessage())); } timeSource.AdvanceTime(50); - cd.Wait(1000); + cd.Wait(1000, TestContext.Current.CancellationToken); } Assert.True(DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - start <= 15000, $"elapsed {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - start}"); } @@ -135,7 +135,7 @@ public void DelayPublishLoadTestSystemTime() { for (int i = 0; i < iterations; i++) { delay.Handle(new DelaySendEnvelope(TimeSource.System, TimeSpan.FromMilliseconds(50), new TestMessage())); } - cd.Wait(1000); + cd.Wait(1000, TestContext.Current.CancellationToken); } Assert.True(DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - start <= 15000, $"elapsed {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - start}"); } diff --git a/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj b/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj index 84c9f035..1be0e701 100644 --- a/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj +++ b/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj @@ -10,16 +10,8 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/ReactiveDomain.Messaging.Tests/when_sending_commands_via_single_queued_dispatcher.cs b/src/ReactiveDomain.Messaging.Tests/when_sending_commands_via_single_queued_dispatcher.cs index c03327a3..a48dfa34 100644 --- a/src/ReactiveDomain.Messaging.Tests/when_sending_commands_via_single_queued_dispatcher.cs +++ b/src/ReactiveDomain.Messaging.Tests/when_sending_commands_via_single_queued_dispatcher.cs @@ -31,7 +31,7 @@ public when_sending_commands_via_single_queued_dispatcher() { [Fact] public void send_cmd_msg_sequence_is_correct() { - var t1 = Task.Run(() => _dispatcher.Send(new TestCommands.Command1())); + var t1 = Task.Run(() => _dispatcher.Send(new TestCommands.Command1()), TestContext.Current.CancellationToken); AssertEx.EnsureRunning(t1); AssertEx.IsOrBecomesTrue(() => Interlocked.Read(ref _gotAck) == 1); Assert.True(_commandHandleStarted == 0); diff --git a/src/ReactiveDomain.Messaging.Tests/when_sending_remote_handled_commands.cs b/src/ReactiveDomain.Messaging.Tests/when_sending_remote_handled_commands.cs index aabde63f..6e7ca944 100644 --- a/src/ReactiveDomain.Messaging.Tests/when_sending_remote_handled_commands.cs +++ b/src/ReactiveDomain.Messaging.Tests/when_sending_remote_handled_commands.cs @@ -42,12 +42,12 @@ public void can_cancel_commands_from_either_bus() { { var ts1 = new CancellationTokenSource(); CommandResponse response1 = null; - var t1 = Task.Run(()=> Assert.False(_fixture.LocalBus.TrySend(new TestCommands.RemoteCancel(ts1.Token), out response1))); + var t1 = Task.Run(()=> Assert.False(_fixture.LocalBus.TrySend(new TestCommands.RemoteCancel(ts1.Token), out response1)), TestContext.Current.CancellationToken); ts1.Cancel(); var ts2 = new CancellationTokenSource(); CommandResponse response2 = null; - var t2 = Task.Run(() => Assert.False(_fixture.RemoteBus.TrySend(new TestCommands.RemoteCancel(ts2.Token), out response2))); + var t2 = Task.Run(() => Assert.False(_fixture.RemoteBus.TrySend(new TestCommands.RemoteCancel(ts2.Token), out response2)), TestContext.Current.CancellationToken); ts2.Cancel(); AssertEx.EnsureComplete(t1, t2); From 86a55b3aa594699d460f41a4fcb3519a41f1cd02 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 13 Feb 2025 05:08:47 -0500 Subject: [PATCH 07/13] Changes xunit dependency library from v2.x to v3.x for ReactiveDomain.Policy.Tests class library. --- .../ReactiveDomain.Policy.Tests.csproj | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj b/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj index 57290d1a..12020fd3 100644 --- a/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj +++ b/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj @@ -10,16 +10,8 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + From 837540ff174ca0f2f7a725b52f662bca1cc3f657 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 13 Feb 2025 05:10:36 -0500 Subject: [PATCH 08/13] Changes xunit dependency library from v2.x to v3.x for ReactiveDomain.PolicyStorage.Tests class library. --- .../ReactiveDomain.PolicyStorage.Tests.csproj | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj b/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj index abb9680d..bb33a6bb 100644 --- a/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj +++ b/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj @@ -15,16 +15,8 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + From 035bd071869511f42fd5d30a18c1e7d10c386b84 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Sat, 15 Feb 2025 12:03:18 -0500 Subject: [PATCH 09/13] After rebase, places ubuntu-latest back into repo. --- .github/workflows/pr-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index cabe3dd3..dc362559 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -62,7 +62,7 @@ jobs: # Install .NET Core - name: Install .NET ${{ matrix.dotnet-version }} - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnet-version }} From 27c86853617dee4333b1ccce3ffd96f0f7cbdbfa Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Thu, 20 Feb 2025 15:33:41 -0500 Subject: [PATCH 10/13] Update pr-checks.yml Moves matrix.os back to `ubuntu-latest` --- .github/workflows/pr-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index dc362559..cabe3dd3 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -62,7 +62,7 @@ jobs: # Install .NET Core - name: Install .NET ${{ matrix.dotnet-version }} - if: ${{ matrix.os == 'ubuntu-22.04' }} + if: ${{ matrix.os == 'ubuntu-latest' }} uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnet-version }} From 07600a6ef138886fbd420d253526ea82aa0899e6 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Sat, 1 Mar 2025 16:44:33 -0500 Subject: [PATCH 11/13] csproj updates to support microsoft testing platform. --- .github/workflows/pr-checks.yml | 2 +- .../ReactiveDomain.Foundation.Tests.csproj | 2 ++ .../ReactiveDomain.IdentityStorage.Tests.csproj | 6 ++++-- .../ReactiveDomain.Messaging.Tests.csproj | 2 ++ .../ReactiveDomain.Policy.Tests.csproj | 4 +++- .../ReactiveDomain.PolicyStorage.Tests.csproj | 2 ++ .../ReactiveDomain.Transport.Tests.csproj | 2 ++ 7 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index dc362559..cabe3dd3 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -62,7 +62,7 @@ jobs: # Install .NET Core - name: Install .NET ${{ matrix.dotnet-version }} - if: ${{ matrix.os == 'ubuntu-22.04' }} + if: ${{ matrix.os == 'ubuntu-latest' }} uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnet-version }} diff --git a/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj b/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj index 7b7da604..953350e0 100644 --- a/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj +++ b/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj @@ -3,6 +3,8 @@ $(TestTargetFrameworks) true + true + true diff --git a/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj b/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj index 6a919031..2fefc416 100644 --- a/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj +++ b/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj @@ -2,8 +2,10 @@ $(TestTargetFrameworks) - true - + true + true + true + diff --git a/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj b/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj index 1be0e701..dd1f4c71 100644 --- a/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj +++ b/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj @@ -3,6 +3,8 @@ $(TestTargetFrameworks) true + true + true diff --git a/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj b/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj index 12020fd3..d8333e00 100644 --- a/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj +++ b/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj @@ -3,7 +3,9 @@ $(TestTargetFrameworks) true - + true + true + diff --git a/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj b/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj index bb33a6bb..fe9b5e52 100644 --- a/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj +++ b/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj @@ -4,6 +4,8 @@ $(TestTargetFrameworks) true ReactiveDomain.Policy.Tests + true + true diff --git a/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj b/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj index 82c4994c..1955421e 100644 --- a/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj +++ b/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj @@ -3,6 +3,8 @@ $(TestTargetFrameworks) true + true + true From 8ac27cf932e47f6c4500e31cbd0fc16497a4f7c9 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Mon, 3 Mar 2025 15:21:28 -0500 Subject: [PATCH 12/13] Adds microsoft testing platform settings to project. We're setting the output type to Exe as part of the testing platform, as the real expectation of xUnit v3, from what I can discover, is an executable. Next check-in will convert the rest of the testing projects to output and executable as well. --- src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj b/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj index 08d7d7fd..a8ceee8f 100644 --- a/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj +++ b/src/ReactiveDomain.Testing/ReactiveDomain.Testing.csproj @@ -4,6 +4,9 @@ $(LibTargetFrameworks) True true + Exe + true + true From 3fcb7d9c20eed849c9728753ceb56c51b01b05a6 Mon Sep 17 00:00:00 2001 From: Richard Bennett Date: Mon, 3 Mar 2025 15:27:37 -0500 Subject: [PATCH 13/13] Converts output type from Library to Exe for xUnit tests. --- .../ReactiveDomain.Foundation.Tests.csproj | 3 ++- .../ReactiveDomain.IdentityStorage.Tests.csproj | 1 + .../ReactiveDomain.Messaging.Tests.csproj | 1 + .../ReactiveDomain.Policy.Tests.csproj | 1 + .../ReactiveDomain.PolicyStorage.Tests.csproj | 3 ++- .../ReactiveDomain.Transport.Tests.csproj | 1 + 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj b/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj index 953350e0..5998b0e0 100644 --- a/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj +++ b/src/ReactiveDomain.Foundation.Tests/ReactiveDomain.Foundation.Tests.csproj @@ -3,7 +3,8 @@ $(TestTargetFrameworks) true - true + Exe + true true diff --git a/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj b/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj index 2fefc416..f31b8903 100644 --- a/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj +++ b/src/ReactiveDomain.IdentityStorage.Tests/ReactiveDomain.IdentityStorage.Tests.csproj @@ -3,6 +3,7 @@ $(TestTargetFrameworks) true + Exe true true diff --git a/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj b/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj index dd1f4c71..31f71d39 100644 --- a/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj +++ b/src/ReactiveDomain.Messaging.Tests/ReactiveDomain.Messaging.Tests.csproj @@ -3,6 +3,7 @@ $(TestTargetFrameworks) true + Exe true true diff --git a/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj b/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj index d8333e00..763ab12c 100644 --- a/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj +++ b/src/ReactiveDomain.Policy.Tests/ReactiveDomain.Policy.Tests.csproj @@ -3,6 +3,7 @@ $(TestTargetFrameworks) true + Exe true true diff --git a/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj b/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj index fe9b5e52..4f267ee7 100644 --- a/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj +++ b/src/ReactiveDomain.PolicyStorage.Tests/ReactiveDomain.PolicyStorage.Tests.csproj @@ -4,7 +4,8 @@ $(TestTargetFrameworks) true ReactiveDomain.Policy.Tests - true + Exe + true true diff --git a/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj b/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj index 1955421e..dd4ff901 100644 --- a/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj +++ b/src/ReactiveDomain.Transport.Tests/ReactiveDomain.Transport.Tests.csproj @@ -3,6 +3,7 @@ $(TestTargetFrameworks) true + Exe true true