From 961940cc78e3b85f0b4b958dac9fb287a79c9335 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Fri, 2 Dec 2022 04:44:14 -0500 Subject: [PATCH 01/11] MM --- .../Microsoft.StreamProcessing.Provider.csproj | 6 +++--- .../Microsoft.StreamProcessing.csproj | 6 +++--- Sources/Test/SimpleTesting/SimpleTesting.csproj | 13 ++++++++++--- Sources/Test/TrillPerf/PerformanceTesting.csproj | 11 +++++++++-- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj index 1d9de4e69..b38205d12 100644 --- a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj +++ b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + net6.0;net7.0;net472 x64;AnyCPU @@ -11,11 +11,11 @@ - + - + diff --git a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj index b96b07891..1fcb6e2c1 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj +++ b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + net6.0;net7.0;net472 x64;AnyCPU @@ -11,8 +11,8 @@ - - + + diff --git a/Sources/Test/SimpleTesting/SimpleTesting.csproj b/Sources/Test/SimpleTesting/SimpleTesting.csproj index 6e35f0351..9c01afb03 100644 --- a/Sources/Test/SimpleTesting/SimpleTesting.csproj +++ b/Sources/Test/SimpleTesting/SimpleTesting.csproj @@ -1,7 +1,7 @@  - net472;netcoreapp3.1 + net6.0;net7.0;net472net472;net7;net7]};net7211 AnyCPU @@ -11,14 +11,14 @@ - + - + false @@ -160,6 +160,13 @@ ShuffleStreamableTests.tt + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/Sources/Test/TrillPerf/PerformanceTesting.csproj b/Sources/Test/TrillPerf/PerformanceTesting.csproj index e7aae4a51..992c531ce 100644 --- a/Sources/Test/TrillPerf/PerformanceTesting.csproj +++ b/Sources/Test/TrillPerf/PerformanceTesting.csproj @@ -2,14 +2,21 @@ Exe - net472;netcoreapp3.1 + net472;net6.0;net7.0 AnyCPU - + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + From a28d04e1ec767b7142744362bda542b0168517b3 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Fri, 2 Dec 2022 09:28:00 -0500 Subject: [PATCH 02/11] 1.GlobalSuppression file added to supress irregular naming conventions 2. Workaround to windows only thread affinity in Native32 for Linux 3. Solution updated to target Net7, Net6, Net472, and NetCoreapp3.1 --- Sources/.editorconfig | 12 ++++- ...Microsoft.StreamProcessing.Provider.csproj | 2 +- .../Microsoft.StreamProcessing.csproj | 2 +- .../Utilities/Native32.cs | 12 ++++- .../Test/SimpleTesting/GlobalSuppressions.cs | 24 +++++++++ .../Macros/LeftOuterJoinTests.cs | 16 +++--- .../Test/SimpleTesting/SimpleTesting.csproj | 2 +- .../SimpleTesting/Streamables/AfaTests.cs | 52 +++++++++---------- .../SimpleTesting/Streamables/JoinTests.cs | 16 +++--- .../Test/TrillPerf/PerformanceTesting.csproj | 2 +- 10 files changed, 91 insertions(+), 49 deletions(-) create mode 100644 Sources/Test/SimpleTesting/GlobalSuppressions.cs diff --git a/Sources/.editorconfig b/Sources/.editorconfig index 1bae2e959..116ea2776 100644 --- a/Sources/.editorconfig +++ b/Sources/.editorconfig @@ -50,4 +50,14 @@ csharp_new_line_before_catch = true csharp_new_line_before_finally = true csharp_indent_case_contents = true csharp_indent_switch_labels = true -csharp_preserve_single_line_statements = false \ No newline at end of file +csharp_preserve_single_line_statements = false +[*.cs] + +# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.NamingRules' +dotnet_analyzer_diagnostic.category-StyleCop.CSharp.NamingRules.severity = none + +# Default severity for all analyzer diagnostics +dotnet_analyzer_diagnostic.severity = none + +# SA1314: Type parameter names should begin with T +dotnet_diagnostic.SA1314.severity = none diff --git a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj index b38205d12..f60cb12a7 100644 --- a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj +++ b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net472 + net6.0;net7.0;net472;netcoreapp3.1 x64;AnyCPU diff --git a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj index 1fcb6e2c1..284cb528d 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj +++ b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net472 + net6.0;net7.0;net472;netcoreapp3.1 x64;AnyCPU diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/Native32.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/Native32.cs index f2924c0e7..d19a7ca57 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/Native32.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/Native32.cs @@ -74,8 +74,16 @@ internal static void AffinitizeThread(int processor) { if (utid == pt.Id) { - long AffinityMask = 1 << processor; - pt.ProcessorAffinity = (IntPtr)(AffinityMask); // Set affinity for this + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + pt.IdealProcessor = processor; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + long AffinityMask = 1 << processor; + pt.ProcessorAffinity = (IntPtr)(AffinityMask); // Set affinity for this + } } } } diff --git a/Sources/Test/SimpleTesting/GlobalSuppressions.cs b/Sources/Test/SimpleTesting/GlobalSuppressions.cs new file mode 100644 index 000000000..c89b555bf --- /dev/null +++ b/Sources/Test/SimpleTesting/GlobalSuppressions.cs @@ -0,0 +1,24 @@ +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. +// Project-level suppressions either have no target or are given +// a specific target and scoped to a namespace, type, member, etc. + +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnar.CheckpointRegressionColumnar")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnar.MaxBug0Columnar")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnar.MaxBug1Columnar")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnar.MaxBug2Columnar")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnarSmallBatch.CheckpointRegressionColumnarSmallBatch")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnarSmallBatch.MaxBug0ColumnarSmallBatch")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnarSmallBatch.MaxBug1ColumnarSmallBatch")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnarSmallBatch.MaxBug2ColumnarSmallBatch")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRow.CheckpointRegressionRow")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRow.MaxBug0Row")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRow.MaxBug1Row")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRow.MaxBug2Row")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRowSmallBatch.CheckpointRegressionRowSmallBatch")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRowSmallBatch.MaxBug0RowSmallBatch")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRowSmallBatch.MaxBug1RowSmallBatch")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRowSmallBatch.MaxBug2RowSmallBatch")] +[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1305:Field names should not use Hungarian notation", Justification = "", Scope = "member", Target = "~M:SimpleTesting.Extensions.ToEvents``1(System.Collections.Generic.IEnumerable{``0},System.Func{``0,System.Int64},System.Func{``0,System.Int64})~System.Collections.Generic.IEnumerable{Microsoft.StreamProcessing.StreamEvent{``0}}")] diff --git a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs index 6b778f07d..68c8b6593 100644 --- a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs +++ b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs @@ -82,8 +82,8 @@ public void LOJ1Row() var query = leftStream.LeftOuterJoin(rightStream, e => e.field1, e => e.field3, (l, r) => l.field2 != "E", - (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, - (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); + (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, + (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); var resultAsync = result.ForEachAsync(o => output.Add(o)); @@ -144,8 +144,8 @@ public void LOJ1RowSmallBatch() var query = leftStream.LeftOuterJoin(rightStream, e => e.field1, e => e.field3, (l, r) => l.field2 != "E", - (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, - (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); + (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, + (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); var resultAsync = result.ForEachAsync(o => output.Add(o)); @@ -205,8 +205,8 @@ public void LOJ1Columnar() var query = leftStream.LeftOuterJoin(rightStream, e => e.field1, e => e.field3, (l, r) => l.field2 != "E", - (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, - (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); + (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, + (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); var resultAsync = result.ForEachAsync(o => output.Add(o)); @@ -267,8 +267,8 @@ public void LOJ1ColumnarSmallBatch() var query = leftStream.LeftOuterJoin(rightStream, e => e.field1, e => e.field3, (l, r) => l.field2 != "E", - (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, - (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); + (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, + (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); var resultAsync = result.ForEachAsync(o => output.Add(o)); diff --git a/Sources/Test/SimpleTesting/SimpleTesting.csproj b/Sources/Test/SimpleTesting/SimpleTesting.csproj index 9c01afb03..546873730 100644 --- a/Sources/Test/SimpleTesting/SimpleTesting.csproj +++ b/Sources/Test/SimpleTesting/SimpleTesting.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net472net472;net7;net7]};net7211 + net6.0;net7.0;net472;netcoreapp3.1 AnyCPU diff --git a/Sources/Test/SimpleTesting/Streamables/AfaTests.cs b/Sources/Test/SimpleTesting/Streamables/AfaTests.cs index 68aa36026..a48bd6fdd 100644 --- a/Sources/Test/SimpleTesting/Streamables/AfaTests.cs +++ b/Sources/Test/SimpleTesting/Streamables/AfaTests.cs @@ -845,15 +845,15 @@ public void GroupedAfa() var source = new StreamEvent>[] { StreamEvent.CreateStart(0, new Tuple("A", 1)), - StreamEvent.CreateStart(1, new Tuple("A", 2)), - StreamEvent.CreateStart(2, new Tuple("B", 2)), + StreamEvent.CreateStart(1, new Tuple("A", 2)), + StreamEvent.CreateStart(2, new Tuple("B", 2)), StreamEvent.CreateStart(3, new Tuple("A", 1)), StreamEvent.CreateStart(4, new Tuple("B", 1)), - StreamEvent.CreateStart(5, new Tuple("B", 2)), + StreamEvent.CreateStart(5, new Tuple("B", 2)), StreamEvent.CreateStart(6, new Tuple("B", 1)), StreamEvent.CreateStart(7, new Tuple("C", 1)), - StreamEvent.CreateStart(8, new Tuple("B", 2)), - StreamEvent.CreateStart(9, new Tuple("A", 2)), + StreamEvent.CreateStart(8, new Tuple("B", 2)), + StreamEvent.CreateStart(9, new Tuple("A", 2)), }.ToObservable() .ToStreamable() .AlterEventDuration(7); @@ -893,18 +893,18 @@ public void GroupedAfa_IsSyncTimeSimultaneityFree() var source = new StreamEvent>[] { StreamEvent.CreateStart(0, new Tuple("A", 1)), - StreamEvent.CreateStart(1, new Tuple("A", 2)), - StreamEvent.CreateStart(1, new Tuple("B", 2)), + StreamEvent.CreateStart(1, new Tuple("A", 2)), + StreamEvent.CreateStart(1, new Tuple("B", 2)), StreamEvent.CreateStart(3, new Tuple("A", 1)), StreamEvent.CreatePunctuation>(4), StreamEvent.CreateStart(4, new Tuple("B", 1)), - StreamEvent.CreateStart(4, new Tuple("B", 2)), + StreamEvent.CreateStart(4, new Tuple("B", 2)), StreamEvent.CreateStart(5, new Tuple("B", 1)), StreamEvent.CreateStart(5, new Tuple("C", 1)), - StreamEvent.CreateStart(6, new Tuple("B", 2)), - StreamEvent.CreateStart(7, new Tuple("A", 2)), + StreamEvent.CreateStart(6, new Tuple("B", 2)), + StreamEvent.CreateStart(7, new Tuple("A", 2)), StreamEvent.CreatePunctuation>(7), }.ToObservable() @@ -959,23 +959,23 @@ public void PartitionedAfa() var source = new PartitionedStreamEvent[] { PartitionedStreamEvent.CreateStart(1, 0, "A"), - PartitionedStreamEvent.CreateStart(2, 0, "A"), + PartitionedStreamEvent.CreateStart(2, 0, "A"), PartitionedStreamEvent.CreateStart(1, 1, "B"), PartitionedStreamEvent.CreateStart(1, 2, "B"), - PartitionedStreamEvent.CreateStart(2, 2, "B"), + PartitionedStreamEvent.CreateStart(2, 2, "B"), PartitionedStreamEvent.CreateStart(1, 3, "A"), PartitionedStreamEvent.CreateStart(1, 4, "C"), - PartitionedStreamEvent.CreateStart(2, 3, "C"), - PartitionedStreamEvent.CreateStart(2, 4, "A"), + PartitionedStreamEvent.CreateStart(2, 3, "C"), + PartitionedStreamEvent.CreateStart(2, 4, "A"), PartitionedStreamEvent.CreateStart(1, 5, "A"), PartitionedStreamEvent.CreateStart(1, 6, "B"), - PartitionedStreamEvent.CreateStart(2, 5, "B"), + PartitionedStreamEvent.CreateStart(2, 5, "B"), PartitionedStreamEvent.CreateStart(1, 7, "B"), - PartitionedStreamEvent.CreateStart(2, 6, "B"), + PartitionedStreamEvent.CreateStart(2, 6, "B"), PartitionedStreamEvent.CreateStart(1, 8, "B"), PartitionedStreamEvent.CreateStart(1, 9, "A"), - PartitionedStreamEvent.CreateStart(2, 7, "A"), - PartitionedStreamEvent.CreateStart(2, 8, "B") + PartitionedStreamEvent.CreateStart(2, 7, "A"), + PartitionedStreamEvent.CreateStart(2, 8, "B") }.ToObservable() .ToStreamable() .AlterEventDuration(7); @@ -1016,23 +1016,23 @@ public void PartitionedAfa_IsSyncTimeSimultaneityFree() var source = new PartitionedStreamEvent[] { PartitionedStreamEvent.CreateStart(1, 0, "A"), - PartitionedStreamEvent.CreateStart(2, 0, "A"), + PartitionedStreamEvent.CreateStart(2, 0, "A"), PartitionedStreamEvent.CreateStart(1, 1, "B"), PartitionedStreamEvent.CreateStart(1, 1, "B"), - PartitionedStreamEvent.CreateStart(2, 0, "B"), + PartitionedStreamEvent.CreateStart(2, 0, "B"), PartitionedStreamEvent.CreateStart(1, 3, "A"), PartitionedStreamEvent.CreateStart(1, 4, "C"), - PartitionedStreamEvent.CreateStart(2, 3, "C"), - PartitionedStreamEvent.CreateStart(2, 4, "A"), + PartitionedStreamEvent.CreateStart(2, 3, "C"), + PartitionedStreamEvent.CreateStart(2, 4, "A"), PartitionedStreamEvent.CreateStart(1, 5, "A"), PartitionedStreamEvent.CreateStart(1, 6, "B"), - PartitionedStreamEvent.CreateStart(2, 4, "B"), + PartitionedStreamEvent.CreateStart(2, 4, "B"), PartitionedStreamEvent.CreateStart(1, 7, "B"), - PartitionedStreamEvent.CreateStart(2, 6, "B"), + PartitionedStreamEvent.CreateStart(2, 6, "B"), PartitionedStreamEvent.CreateStart(1, 8, "B"), PartitionedStreamEvent.CreateStart(1, 9, "A"), - PartitionedStreamEvent.CreateStart(2, 7, "A"), - PartitionedStreamEvent.CreateStart(2, 8, "B") + PartitionedStreamEvent.CreateStart(2, 7, "A"), + PartitionedStreamEvent.CreateStart(2, 8, "B") }.ToObservable() .ToStreamable() .AlterEventDuration(7); diff --git a/Sources/Test/SimpleTesting/Streamables/JoinTests.cs b/Sources/Test/SimpleTesting/Streamables/JoinTests.cs index ca4ecb8c2..b5c2fe2e4 100644 --- a/Sources/Test/SimpleTesting/Streamables/JoinTests.cs +++ b/Sources/Test/SimpleTesting/Streamables/JoinTests.cs @@ -83,7 +83,7 @@ public void IOOEJ2RowMultiString() input2, e => e.field1, e => e, - (l, r) => new GameData() { EventType = l.field1, GameId = r, }); + (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var result = query .ToPayloadEnumerable() .ToArray(); @@ -446,7 +446,7 @@ public void IOOEJ2RowRegularString() input2, e => e.field1, e => e, - (l, r) => new GameData() { EventType = l.field1, GameId = r, }); + (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var result = query .ToPayloadEnumerable() .ToArray(); @@ -810,7 +810,7 @@ public void IOOEJ2RowSmallBatchMultiString() input2, e => e.field1, e => e, - (l, r) => new GameData() { EventType = l.field1, GameId = r, }); + (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var result = query .ToPayloadEnumerable() .ToArray(); @@ -1174,7 +1174,7 @@ public void IOOEJ2RowSmallBatchRegularString() input2, e => e.field1, e => e, - (l, r) => new GameData() { EventType = l.field1, GameId = r, }); + (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var result = query .ToPayloadEnumerable() .ToArray(); @@ -1537,7 +1537,7 @@ public void IOOEJ2ColumnarMultiString() input2, e => e.field1, e => e, - (l, r) => new GameData() { EventType = l.field1, GameId = r, }); + (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var result = query .ToPayloadEnumerable() .ToArray(); @@ -1900,7 +1900,7 @@ public void IOOEJ2ColumnarRegularString() input2, e => e.field1, e => e, - (l, r) => new GameData() { EventType = l.field1, GameId = r, }); + (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var result = query .ToPayloadEnumerable() .ToArray(); @@ -2264,7 +2264,7 @@ public void IOOEJ2ColumnarSmallBatchMultiString() input2, e => e.field1, e => e, - (l, r) => new GameData() { EventType = l.field1, GameId = r, }); + (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var result = query .ToPayloadEnumerable() .ToArray(); @@ -2628,7 +2628,7 @@ public void IOOEJ2ColumnarSmallBatchRegularString() input2, e => e.field1, e => e, - (l, r) => new GameData() { EventType = l.field1, GameId = r, }); + (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var result = query .ToPayloadEnumerable() .ToArray(); diff --git a/Sources/Test/TrillPerf/PerformanceTesting.csproj b/Sources/Test/TrillPerf/PerformanceTesting.csproj index 992c531ce..a5c1f0e0f 100644 --- a/Sources/Test/TrillPerf/PerformanceTesting.csproj +++ b/Sources/Test/TrillPerf/PerformanceTesting.csproj @@ -2,7 +2,7 @@ Exe - net472;net6.0;net7.0 + net472;net6.0;net7.0;netcoreapp3.1 AnyCPU From 7fa170acb6be6e3dcab8a248ccf6d0eb72e7b75f Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Wed, 11 Jan 2023 04:28:40 -0500 Subject: [PATCH 03/11] - Removed netcoreapp3.1 - Upgraded MSTest packages with security vulerabilites - Reverted StyleCop package update from previous commit --- .../Microsoft.StreamProcessing.Provider.csproj | 2 +- .../Microsoft.StreamProcessing.csproj | 2 +- Sources/Test/SimpleTesting/SimpleTesting.csproj | 12 ++++++------ Sources/Test/TrillPerf/PerformanceTesting.csproj | 9 +-------- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj index f60cb12a7..b38205d12 100644 --- a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj +++ b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net472;netcoreapp3.1 + net6.0;net7.0;net472 x64;AnyCPU diff --git a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj index 284cb528d..1fcb6e2c1 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj +++ b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net472;netcoreapp3.1 + net6.0;net7.0;net472 x64;AnyCPU diff --git a/Sources/Test/SimpleTesting/SimpleTesting.csproj b/Sources/Test/SimpleTesting/SimpleTesting.csproj index 546873730..9b97824ad 100644 --- a/Sources/Test/SimpleTesting/SimpleTesting.csproj +++ b/Sources/Test/SimpleTesting/SimpleTesting.csproj @@ -1,16 +1,16 @@  - net6.0;net7.0;net472;netcoreapp3.1 + net7.0;net6.0;net472 AnyCPU - - - + + + @@ -18,7 +18,7 @@ Microsoft.NET.Test.Sdk in .NET Core injects a stub main entry point for test execution by default to convert lib projects to console apps. Since we have our own entry point to enable manually compiling OutputType of Exe, we need to tell it not to generate one automatically. --> - + false @@ -162,7 +162,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Sources/Test/TrillPerf/PerformanceTesting.csproj b/Sources/Test/TrillPerf/PerformanceTesting.csproj index a5c1f0e0f..3df5caec3 100644 --- a/Sources/Test/TrillPerf/PerformanceTesting.csproj +++ b/Sources/Test/TrillPerf/PerformanceTesting.csproj @@ -2,7 +2,7 @@ Exe - net472;net6.0;net7.0;netcoreapp3.1 + net7.0;net6.0;net472 AnyCPU @@ -12,13 +12,6 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - true From 4cc6c5b1bef64b780a1c4a4a3b8df073d4ef08f6 Mon Sep 17 00:00:00 2001 From: Amir Burbea Date: Mon, 23 Mar 2026 17:15:27 -0700 Subject: [PATCH 04/11] Upgrade to .NET 8 and fix async-incompatible ConfigModifier locking - Target net8.0 across all projects, dropping net6.0/net7.0/net472 - Remove legacy .NET Standard packages (System.Linq.Expressions 4.3.0, Microsoft.CSharp 4.7.0, System.Diagnostics.*, etc.) now built into the runtime - Upgrade Microsoft.CodeAnalysis.Scripting 4.4.0 -> 5.3.0 - Upgrade MSTest 3.x -> 4.x, System.Reactive 5.x -> 6.x, and other packages - Fix ConfigModifier gate: replace Monitor (thread-affine) with SemaphoreSlim + AsyncLocal depth counter, making it safe for async tests that release from a different thread while remaining re-entrant for nested Modify() calls - Make T4 template import conditional so dotnet CLI builds work without VS - Add trill.runsettings with StopRunOnFirstFailure for faster test diagnosis - All 3185 tests pass on .NET 8 --- .gitignore | 2 + ...Microsoft.StreamProcessing.Provider.csproj | 16 +- .../Microsoft.StreamProcessing.csproj | 11 +- .../Utilities/Config.cs | 14 +- Sources/Test/SimpleTesting/AdHocTests.cs | 59 ++-- .../SimpleTesting/CheckpointRestoreTests.cs | 8 +- .../Collections/AbstractEventBatch.cs | 48 +-- .../SimpleTesting/Collections/FastListTest.cs | 8 +- .../SimpleTesting/Collections/FastMapTest.cs | 6 +- Sources/Test/SimpleTesting/Common.cs | 5 - .../DisorderedIngressAndEgressTests.cs | 64 ++-- .../FlushPolicyTestMatrixBase.cs | 6 +- .../Macros/LeftOuterJoinTests.cs | 16 +- .../Test/SimpleTesting/MultiStringTests.cs | 4 +- ...titionedIngressAndEgressTestMatrixBases.cs | 6 +- .../Partitioned/PartitionedStreamTests.cs | 6 +- .../Serializer/SurrogateTests.cs | 2 +- .../Test/SimpleTesting/SimpleTesting.csproj | 17 +- Sources/Test/SimpleTesting/SimpleTests.cs | 304 +++++++++--------- .../SimpleTesting/Streamables/JoinTests.cs | 96 +++--- .../Streamables/ShuffleStreamableTests.cs | 16 +- Sources/Test/SimpleTesting/trill.runsettings | 6 + .../Test/TrillPerf/PerformanceTesting.csproj | 15 +- 23 files changed, 367 insertions(+), 368 deletions(-) create mode 100644 Sources/Test/SimpleTesting/trill.runsettings diff --git a/.gitignore b/.gitignore index 809f06a76..ed8c08844 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,5 @@ $tf/pendingchanges.tfb $tf/properties.tf1 project.lock.json **/.vs/ + +.claude/ \ No newline at end of file diff --git a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj index b38205d12..b4dfea5bb 100644 --- a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj +++ b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net472 + net8.0 x64;AnyCPU @@ -11,19 +11,7 @@ - - - - - - - - - - - - - + diff --git a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj index 1fcb6e2c1..f3e5fc326 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj +++ b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net472 + net8.0 x64;AnyCPU @@ -11,14 +11,7 @@ - - - - - - - - + diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/Config.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/Config.cs index badaa164f..1f7d1cf20 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/Config.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/Config.cs @@ -467,8 +467,12 @@ public static string Describe() // in VSTest, which is a good thing, since Config is static and those tests may clash otherwise. internal sealed class ConfigModifier { - // lockable gate allowing only one ConfigModifier active at a time - private static readonly object gate = new object(); + // Serializes concurrent ConfigModifier usage across tests. + // SemaphoreSlim instead of Monitor so that async tests can release from a different thread. + // AsyncLocal depth counter makes it re-entrant within the same async call context (e.g. nested + // using blocks within a single test) without blocking on the semaphore a second time. + private static readonly SemaphoreSlim gate = new SemaphoreSlim(1, 1); + private static readonly AsyncLocal gateDepth = new AsyncLocal(); // collection of Config modifications private readonly List modifications = new List(); @@ -723,7 +727,8 @@ public ConfigModifier SerializationCompressionLevel(SerializationCompressionLeve public IDisposable Modify() { - Monitor.Enter(gate); + if (gateDepth.Value == 0) gate.Wait(); + gateDepth.Value++; foreach (var m in this.modifications) m.Modify(); @@ -732,7 +737,8 @@ public IDisposable Modify() foreach (var m in this.modifications) m.Modify(); - Monitor.Exit(gate); + gateDepth.Value--; + if (gateDepth.Value == 0) gate.Release(); }); } diff --git a/Sources/Test/SimpleTesting/AdHocTests.cs b/Sources/Test/SimpleTesting/AdHocTests.cs index 41c0cca20..6c11d45a8 100644 --- a/Sources/Test/SimpleTesting/AdHocTests.cs +++ b/Sources/Test/SimpleTesting/AdHocTests.cs @@ -141,11 +141,11 @@ private void TestSerialization() ms.Position = 0; ColumnBatch resultStr = s.Deserialize(ms); - Assert.IsTrue(resultStr.UsedLength == inputStr.UsedLength); + Assert.AreEqual(inputStr.UsedLength, resultStr.UsedLength); for (int j = 0; j < inputStr.UsedLength; j++) { - Assert.IsTrue(inputStr.col[j] == resultStr.col[j]); + Assert.AreEqual(resultStr.col[j], inputStr.col[j]); } resultStr.ReturnClear(); inputStr.ReturnClear(); @@ -165,9 +165,9 @@ public void StreamEventArrayIngress1() var s = input.ToObservable(); var str = s.ToStreamable(); var output = str.ToStreamMessageObservable().ToEnumerable().ToArray(); - Assert.IsTrue(output.Length == 1); // first batch with all data and one punctuation - Assert.IsTrue(output[0].Count == length + 1); - Assert.IsTrue(output[0].vother.col[output[0].Count - 1] == StreamEvent.PunctuationOtherTime); + Assert.HasCount(1, output); // first batch with all data and one punctuation + Assert.AreEqual(length + 1, output[0].Count); + Assert.AreEqual(StreamEvent.PunctuationOtherTime, output[0].vother.col[output[0].Count - 1]); for (int i = 0; i < output.Length; i++) output[i].Free(); } @@ -185,11 +185,11 @@ public void StreamEventArrayIngress2() var s = input.ToObservable(); var str = s.ToStreamable(); var output = str.ToStreamMessageObservable().ToEnumerable().ToArray(); - Assert.IsTrue(output.Length == 4); // four data batches - Assert.IsTrue(output[0].Count + output[1].Count + output[2].Count + output[3].Count == length + 1); + Assert.HasCount(4, output); // four data batches + Assert.AreEqual(length + 1, output[0].Count + output[1].Count + output[2].Count + output[3].Count); // fourth data batch should have a punctuation at the end - Assert.IsTrue(output[3].vother.col[output[3].Count - 1] == StreamEvent.PunctuationOtherTime); + Assert.AreEqual(StreamEvent.PunctuationOtherTime, output[3].vother.col[output[3].Count - 1]); for (int i = 0; i < output.Length; i++) output[i].Free(); } @@ -211,15 +211,15 @@ public void StreamEventArrayIngress3() // 10 pairs of data and punc, then one with just a punctuation at infinity int expectedDataBatches = 11; - Assert.IsTrue(output.Length == expectedDataBatches); + Assert.HasCount(expectedDataBatches, output); var dataEventCount = 0; for (int i = 0; i < output.Length; i++) { // Data batch should end with a punctuation - Assert.IsTrue(output[i].vother.col[output[i].Count - 1] == StreamEvent.PunctuationOtherTime); + Assert.AreEqual(StreamEvent.PunctuationOtherTime, output[i].vother.col[output[i].Count - 1]); dataEventCount += output[i].Count - 1; // exclude punctuation } - Assert.IsTrue(dataEventCount == length - 10); // because every 10th row was a punctuation, not a data row + Assert.AreEqual(length - 10, dataEventCount); // because every 10th row was a punctuation, not a data row for (int i = 0; i < output.Length; i++) output[i].Free(); } @@ -255,7 +255,7 @@ public void PartitionedStreamAdjustIngressPolicy() egress.Wait(); output = output.Where(o => o.IsData).ToList(); - Assert.AreEqual(2, output.Count); + Assert.HasCount(2, output); Assert.AreEqual(70, output[0].SyncTime); Assert.AreEqual(22, output[1].SyncTime); } @@ -920,11 +920,11 @@ public void SinglePunctuationBatchTimestamps() batch => { var min = batch.MinTimestamp; - Assert.IsTrue(min >= currentMin); + Assert.IsGreaterThanOrEqualTo(currentMin, min); currentMin = min; var max = batch.MaxTimestamp; - Assert.IsTrue(max >= currentMax); + Assert.IsGreaterThanOrEqualTo(currentMax, max); currentMax = max; batch.Free(); @@ -1311,8 +1311,10 @@ public async Task DisposeTest1() await inputTask; // Make sure we really got an output data event. - Assert.IsTrue(lastSeenSubscription > 0); + Assert.IsGreaterThan(0, lastSeenSubscription); } + + public TestContext TestContext { get; set; } } [TestClass] @@ -1412,7 +1414,7 @@ public struct NormalizedHttpEvent countedNE = countedNE.AlterEventDuration(1); var output2 = countedNE.ToStreamEventObservable(ReshapingPolicy.CoalesceEndEdges).ToEnumerable().ToArray(); - Assert.IsTrue(output2.Count() == 9); + Assert.AreEqual(9, output2.Count()); } } @@ -1871,7 +1873,7 @@ public void LeftJoinOutOfOrder() process.Flush(); var outputData = output.Where(o => o.IsData).ToList(); - Assert.IsTrue(outputData.Count == 2); + Assert.HasCount(2, outputData); } [TestMethod, TestCategory("Gated")] @@ -1949,7 +1951,7 @@ public void StartEdge1() .ToArray(); var x = events.Length; - Assert.IsTrue(x == inputEnumerable.Count()); + Assert.AreEqual(inputEnumerable.Count(), x); } } @@ -2133,12 +2135,14 @@ public void JoinClipTest() }); var result = successes.ToStreamEventObservable().ToEnumerable().ToArray(); - Assert.IsTrue(false); // should never reach here. + Assert.Fail(); // should never reach here. } - catch (Exception e) + catch (InvalidOperationException) { - Assert.IsTrue(e is InvalidOperationException); + // expected, because the Join should not be able to match the clipped events with the finishing events, since the clipped events have had their lifetime shifted by 1 tick, and thus should not overlap with the finishing events. + return; } + Assert.Fail(); // should never reach here. } /// @@ -2249,7 +2253,7 @@ public void Select8() .ToEnumerable() .ToArray() ; - Assert.IsTrue(expected.Count() == output.Length); + Assert.AreEqual(output.Length, expected.Count()); for (int i = 0; i < output.Length; i++) Assert.IsTrue(expected.ElementAt(i).Equals(output[i])); } @@ -2404,18 +2408,15 @@ public void JoinTestWithoutException() .ToStreamable() ; - try - { - var result = stream1 + + var result = stream1 .Join(stream2, e => e.x, e => e, (left, right) => new { LeftX = left.x, RightX = right, }) .ToStreamEventObservable() .ToEnumerable() .ToArray(); - Assert.IsTrue(true); // just test that no exception happened - } - catch (Exception) + if (object.ReferenceEquals(result, null)) { - Assert.IsTrue(false); // should never reach here. + // just to use the result and avoid "unused variable" warning } } diff --git a/Sources/Test/SimpleTesting/CheckpointRestoreTests.cs b/Sources/Test/SimpleTesting/CheckpointRestoreTests.cs index 02483aca7..1a0d6a350 100644 --- a/Sources/Test/SimpleTesting/CheckpointRestoreTests.cs +++ b/Sources/Test/SimpleTesting/CheckpointRestoreTests.cs @@ -1318,7 +1318,7 @@ public void BasicDisorderAdjustPolicyRow() postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); - Assert.IsTrue(outputList.Count == 10000); + Assert.HasCount(10000, outputList); preCheckpointSubject.OnCompleted(); } @@ -2790,7 +2790,7 @@ public void BasicDisorderAdjustPolicyRowSmallBatch() postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); - Assert.IsTrue(outputList.Count == 10000); + Assert.HasCount(10000, outputList); preCheckpointSubject.OnCompleted(); } @@ -4260,7 +4260,7 @@ public void BasicDisorderAdjustPolicyColumnar() postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); - Assert.IsTrue(outputList.Count == 10000); + Assert.HasCount(10000, outputList); preCheckpointSubject.OnCompleted(); } @@ -5732,7 +5732,7 @@ public void BasicDisorderAdjustPolicyColumnarSmallBatch() postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); - Assert.IsTrue(outputList.Count == 10000); + Assert.HasCount(10000, outputList); preCheckpointSubject.OnCompleted(); } diff --git a/Sources/Test/SimpleTesting/Collections/AbstractEventBatch.cs b/Sources/Test/SimpleTesting/Collections/AbstractEventBatch.cs index 28e73fb35..c07b95977 100644 --- a/Sources/Test/SimpleTesting/Collections/AbstractEventBatch.cs +++ b/Sources/Test/SimpleTesting/Collections/AbstractEventBatch.cs @@ -43,21 +43,21 @@ public void ComputeMinMax_Basic() // (a) message.Count = 0; - Assert.IsTrue(message.MinTimestamp == StreamEvent.MinSyncTime, "Empty message with Count=0 has MinTimestamp <> 0."); - Assert.IsTrue(message.MaxTimestamp == StreamEvent.MaxSyncTime, "Empty message with Count=0 has MaxTimestamp <> inf-1."); + Assert.AreEqual(StreamEvent.MinSyncTime, message.MinTimestamp, "Empty message with Count=0 has MinTimestamp <> 0."); + Assert.AreEqual(StreamEvent.MaxSyncTime, message.MaxTimestamp, "Empty message with Count=0 has MaxTimestamp <> inf-1."); // (b) message.Count = 1; message.vsync.col[0] = TESTVALUE; - Assert.IsTrue(message.MinTimestamp == StreamEvent.MinSyncTime, "Empty message with Count=1 has MinTimestamp <> 0."); - Assert.IsTrue(message.MaxTimestamp == StreamEvent.MaxSyncTime, "Empty message with Count=1 has MaxTimestamp <> inf-1."); + Assert.AreEqual(StreamEvent.MinSyncTime, message.MinTimestamp, "Empty message with Count=1 has MinTimestamp <> 0."); + Assert.AreEqual(StreamEvent.MaxSyncTime, message.MaxTimestamp, "Empty message with Count=1 has MaxTimestamp <> inf-1."); // (c) message.Count = 1; message.vsync.col[0] = TESTVALUE; OccupyAt(message, 0); - Assert.IsTrue(message.MinTimestamp == TESTVALUE, "Empty message with Count=1 has MinTimestamp <> TESTVALUE."); - Assert.IsTrue(message.MaxTimestamp == TESTVALUE, "Empty message with Count=1 has MaxTimestamp <> TESTVALUE"); + Assert.AreEqual(TESTVALUE, message.MinTimestamp, "Empty message with Count=1 has MinTimestamp <> TESTVALUE."); + Assert.AreEqual(TESTVALUE, message.MaxTimestamp, "Empty message with Count=1 has MaxTimestamp <> TESTVALUE"); VacateAt(message, 0); message.vsync.col[0] = 0; @@ -65,14 +65,14 @@ public void ComputeMinMax_Basic() message.Count = 100; message.vsync.col[5] = TESTVALUE - 1; message.vsync.col[42] = TESTVALUE; - Assert.IsTrue(message.MinTimestamp == StreamEvent.MinSyncTime, "Empty message with Count>1 has MinTimestamp <> 0."); - Assert.IsTrue(message.MaxTimestamp == StreamEvent.MaxSyncTime, "Empty message with Count>1 has MaxTimestamp <> inf-1"); + Assert.AreEqual(StreamEvent.MinSyncTime, message.MinTimestamp, "Empty message with Count>1 has MinTimestamp <> 0."); + Assert.AreEqual(StreamEvent.MaxSyncTime, message.MaxTimestamp, "Empty message with Count>1 has MaxTimestamp <> inf-1"); // (e) OccupyAt(message, 5); OccupyAt(message, 42); - Assert.IsTrue(message.MinTimestamp == TESTVALUE - 1, "Non-empty message with Count>1 has MinTimestamp <> TESTVALUE-1."); - Assert.IsTrue(message.MaxTimestamp == TESTVALUE, "Non-empty message with Count>1 has MaxTimestamp <> TESTVALUE"); + Assert.AreEqual(TESTVALUE - 1, message.MinTimestamp, "Non-empty message with Count>1 has MinTimestamp <> TESTVALUE-1."); + Assert.AreEqual(TESTVALUE, message.MaxTimestamp, "Non-empty message with Count>1 has MaxTimestamp <> TESTVALUE"); VacateAt(message, 5); VacateAt(message, 42); message.vsync.col[5] = 0; @@ -161,21 +161,21 @@ public void ComputeMinMax_Partitioned_Basic() // (a) message.Count = 0; - Assert.IsTrue(message.MinTimestamp == StreamEvent.MinSyncTime, "Empty message with Count=0 has MinTimestamp <> 0."); - Assert.IsTrue(message.MaxTimestamp == StreamEvent.MaxSyncTime, "Empty message with Count=0 has MaxTimestamp <> inf-1."); + Assert.AreEqual(StreamEvent.MinSyncTime, message.MinTimestamp, "Empty message with Count=0 has MinTimestamp <> 0."); + Assert.AreEqual(StreamEvent.MaxSyncTime, message.MaxTimestamp, "Empty message with Count=0 has MaxTimestamp <> inf-1."); // (b) message.Count = 1; message.vsync.col[0] = TESTVALUE; - Assert.IsTrue(message.MinTimestamp == StreamEvent.MinSyncTime, "Empty message with Count=1 has MinTimestamp <> 0."); - Assert.IsTrue(message.MaxTimestamp == StreamEvent.MaxSyncTime, "Empty message with Count=1 has MaxTimestamp <> inf-1."); + Assert.AreEqual(StreamEvent.MinSyncTime, message.MinTimestamp, "Empty message with Count=1 has MinTimestamp <> 0."); + Assert.AreEqual(StreamEvent.MaxSyncTime, message.MaxTimestamp, "Empty message with Count=1 has MaxTimestamp <> inf-1."); // (c) message.Count = 1; message.vsync.col[0] = TESTVALUE; OccupyAt(message, 0); - Assert.IsTrue(message.MinTimestamp == TESTVALUE, "Empty message with Count=1 has MinTimestamp <> TESTVALUE."); - Assert.IsTrue(message.MaxTimestamp == TESTVALUE, "Empty message with Count=1 has MaxTimestamp <> TESTVALUE"); + Assert.AreEqual(TESTVALUE, message.MinTimestamp, "Empty message with Count=1 has MinTimestamp <> TESTVALUE."); + Assert.AreEqual(TESTVALUE, message.MaxTimestamp, "Empty message with Count=1 has MaxTimestamp <> TESTVALUE"); VacateAt(message, 0); message.vsync.col[0] = 0; @@ -183,14 +183,14 @@ public void ComputeMinMax_Partitioned_Basic() message.Count = 100; message.vsync.col[5] = TESTVALUE - 1; message.vsync.col[42] = TESTVALUE; - Assert.IsTrue(message.MinTimestamp == StreamEvent.MinSyncTime, "Empty message with Count>1 has MinTimestamp <> 0."); - Assert.IsTrue(message.MaxTimestamp == StreamEvent.MaxSyncTime, "Empty message with Count>1 has MaxTimestamp <> inf-1"); + Assert.AreEqual(StreamEvent.MinSyncTime, message.MinTimestamp, "Empty message with Count>1 has MinTimestamp <> 0."); + Assert.AreEqual(StreamEvent.MaxSyncTime, message.MaxTimestamp, "Empty message with Count>1 has MaxTimestamp <> inf-1"); // (e) OccupyAt(message, 5); OccupyAt(message, 42); - Assert.IsTrue(message.MinTimestamp == TESTVALUE - 1, "Non-empty message with Count>1 has MinTimestamp <> TESTVALUE-1."); - Assert.IsTrue(message.MaxTimestamp == TESTVALUE, "Non-empty message with Count>1 has MaxTimestamp <> TESTVALUE"); + Assert.AreEqual(TESTVALUE - 1, message.MinTimestamp, "Non-empty message with Count>1 has MinTimestamp <> TESTVALUE-1."); + Assert.AreEqual(TESTVALUE, message.MaxTimestamp, "Non-empty message with Count>1 has MaxTimestamp <> TESTVALUE"); VacateAt(message, 5); VacateAt(message, 42); message.vsync.col[5] = 0; @@ -218,14 +218,14 @@ public void ComputeMinMax_Partitioned_Compound_Basic() message.Count = 100; message.vsync.col[5] = TESTVALUE; message.vsync.col[42] = TESTVALUE - 1; - Assert.IsTrue(message.MinTimestamp == StreamEvent.MinSyncTime, "Empty message with Count>1 has MinTimestamp <> 0."); - Assert.IsTrue(message.MaxTimestamp == StreamEvent.MaxSyncTime, "Empty message with Count>1 has MaxTimestamp <> inf-1"); + Assert.AreEqual(StreamEvent.MinSyncTime, message.MinTimestamp, "Empty message with Count>1 has MinTimestamp <> 0."); + Assert.AreEqual(StreamEvent.MaxSyncTime, message.MaxTimestamp, "Empty message with Count>1 has MaxTimestamp <> inf-1"); // (e) OccupyAt(message, 5); OccupyAt(message, 42); - Assert.IsTrue(message.MinTimestamp == TESTVALUE - 1, "Non-empty message with Count>1 has MinTimestamp <> TESTVALUE-1."); - Assert.IsTrue(message.MaxTimestamp == TESTVALUE, "Non-empty message with Count>1 has MaxTimestamp <> TESTVALUE"); + Assert.AreEqual(TESTVALUE - 1, message.MinTimestamp, "Non-empty message with Count>1 has MinTimestamp <> TESTVALUE-1."); + Assert.AreEqual(TESTVALUE, message.MaxTimestamp, "Non-empty message with Count>1 has MaxTimestamp <> TESTVALUE"); VacateAt(message, 5); VacateAt(message, 42); message.vsync.col[5] = 0; diff --git a/Sources/Test/SimpleTesting/Collections/FastListTest.cs b/Sources/Test/SimpleTesting/Collections/FastListTest.cs index 946f4c7c9..11c1957e0 100644 --- a/Sources/Test/SimpleTesting/Collections/FastListTest.cs +++ b/Sources/Test/SimpleTesting/Collections/FastListTest.cs @@ -39,9 +39,9 @@ private static void SimpleListTest() int indexA2 = list.Insert("a"); int indexB2 = list.Insert("b"); - Assert.IsTrue(indexA != indexA2); - Assert.IsTrue(indexA != indexB); - Assert.IsTrue(indexA2 != indexB2); + Assert.AreNotEqual(indexA2, indexA); + Assert.AreNotEqual(indexB, indexA); + Assert.AreNotEqual(indexB2, indexA2); Assert.IsFalse(list.IsEmpty); Assert.AreEqual(4, list.Count); @@ -131,7 +131,7 @@ private static void BetterListTest() { check += list.Values[index]; } - Assert.IsTrue(sum == check); + Assert.AreEqual(check, sum); } } } diff --git a/Sources/Test/SimpleTesting/Collections/FastMapTest.cs b/Sources/Test/SimpleTesting/Collections/FastMapTest.cs index 13cfb25c2..51750f2bf 100644 --- a/Sources/Test/SimpleTesting/Collections/FastMapTest.cs +++ b/Sources/Test/SimpleTesting/Collections/FastMapTest.cs @@ -40,9 +40,9 @@ private static void SimpleMapTest() int indexA5Two = map.Insert(5, "a"); int indexB5 = map.Insert(5, "b"); - Assert.IsTrue(indexA5 != indexA5Two); - Assert.IsTrue(indexA5 != indexB5); - Assert.IsTrue(indexA5Two != indexB5); + Assert.AreNotEqual(indexA5Two, indexA5); + Assert.AreNotEqual(indexB5, indexA5); + Assert.AreNotEqual(indexB5, indexA5Two); Assert.IsFalse(map.IsEmpty); Assert.AreEqual(4, map.Count); diff --git a/Sources/Test/SimpleTesting/Common.cs b/Sources/Test/SimpleTesting/Common.cs index 29a080ad0..9ef0d7ca7 100644 --- a/Sources/Test/SimpleTesting/Common.cs +++ b/Sources/Test/SimpleTesting/Common.cs @@ -183,11 +183,6 @@ public static IEnumerable> ToEvents(this IEnumerable input, yield return StreamEvent.CreateInterval(vsSelector(e), veSelector(e), e); } } - -#if NET472 - // string.Split has different signatures across .NET Framework/Core, so use an extension so we can use a single signature - public static string[] Split(this string original, char separator, StringSplitOptions options) => original.Split(separator); -#endif } public static class Helpers diff --git a/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs b/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs index a750c1dea..ea0c22f96 100644 --- a/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs +++ b/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs @@ -1186,7 +1186,7 @@ public void DisorderedStartEdgeTestRowThrow105() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1229,7 +1229,7 @@ public void DisorderedIntervalTestRowThrow105() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -1285,7 +1285,7 @@ public void DisorderedStartEdgeTestRowThrow105Diagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1332,7 +1332,7 @@ public void DisorderedIntervalTestRowThrow105Diagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -1616,7 +1616,7 @@ public void DisorderedStartEdgeTestRowThrow105Time() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1659,7 +1659,7 @@ public void DisorderedIntervalTestRowThrow105Time() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -1715,7 +1715,7 @@ public void DisorderedStartEdgeTestRowThrow105TimeDiagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1762,7 +1762,7 @@ public void DisorderedIntervalTestRowThrow105TimeDiagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -4463,7 +4463,7 @@ public void DisorderedStartEdgeTestRowSmallBatchThrow105() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4506,7 +4506,7 @@ public void DisorderedIntervalTestRowSmallBatchThrow105() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -4563,7 +4563,7 @@ public void DisorderedStartEdgeTestRowSmallBatchThrow105Diagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4610,7 +4610,7 @@ public void DisorderedIntervalTestRowSmallBatchThrow105Diagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -4897,7 +4897,7 @@ public void DisorderedStartEdgeTestRowSmallBatchThrow105Time() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4940,7 +4940,7 @@ public void DisorderedIntervalTestRowSmallBatchThrow105Time() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -4997,7 +4997,7 @@ public void DisorderedStartEdgeTestRowSmallBatchThrow105TimeDiagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -5044,7 +5044,7 @@ public void DisorderedIntervalTestRowSmallBatchThrow105TimeDiagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -7746,7 +7746,7 @@ public void DisorderedStartEdgeTestColumnarThrow105() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -7789,7 +7789,7 @@ public void DisorderedIntervalTestColumnarThrow105() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -7845,7 +7845,7 @@ public void DisorderedStartEdgeTestColumnarThrow105Diagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -7892,7 +7892,7 @@ public void DisorderedIntervalTestColumnarThrow105Diagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -8176,7 +8176,7 @@ public void DisorderedStartEdgeTestColumnarThrow105Time() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -8219,7 +8219,7 @@ public void DisorderedIntervalTestColumnarThrow105Time() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -8275,7 +8275,7 @@ public void DisorderedStartEdgeTestColumnarThrow105TimeDiagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -8322,7 +8322,7 @@ public void DisorderedIntervalTestColumnarThrow105TimeDiagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -11023,7 +11023,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchThrow105() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11066,7 +11066,7 @@ public void DisorderedIntervalTestColumnarSmallBatchThrow105() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -11123,7 +11123,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchThrow105Diagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11170,7 +11170,7 @@ public void DisorderedIntervalTestColumnarSmallBatchThrow105Diagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -11457,7 +11457,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchThrow105Time() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11500,7 +11500,7 @@ public void DisorderedIntervalTestColumnarSmallBatchThrow105Time() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } @@ -11557,7 +11557,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchThrow105TimeDiagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11604,7 +11604,7 @@ public void DisorderedIntervalTestColumnarSmallBatchThrow105TimeDiagnostic() } catch(Exception) { - Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. + // Todo. Verify if the ingress/egress before the exception was correct. } } } diff --git a/Sources/Test/SimpleTesting/IngressEgress/FlushPolicyTestMatrixBase.cs b/Sources/Test/SimpleTesting/IngressEgress/FlushPolicyTestMatrixBase.cs index e0af14413..bac4766d5 100644 --- a/Sources/Test/SimpleTesting/IngressEgress/FlushPolicyTestMatrixBase.cs +++ b/Sources/Test/SimpleTesting/IngressEgress/FlushPolicyTestMatrixBase.cs @@ -12,7 +12,7 @@ namespace SimpleTesting.Flush { - public class FlushTestBase : TestWithConfigSettingsAndMemoryLeakDetection + public abstract class FlushTestBase : TestWithConfigSettingsAndMemoryLeakDetection { private const int IntervalLength = 5; private const int BatchSize = 10; // TODO: this will be identical for FlushPolicy.None and FlushOnBatchBoundary without some filter operator @@ -55,7 +55,7 @@ public void FilterTest() OnIngress(inputSubject, StreamEvent.CreatePunctuation(i)); // Make sure we don't have any pending events we expected to be egressed at this point - Assert.IsTrue(this.expectedOutput.Count == 0); + Assert.IsEmpty(this.expectedOutput); } OnCompleted(inputSubject); @@ -115,7 +115,7 @@ private void MoveFilteredBatchBatchToOutput() private void OnEgress(StreamEvent egressEvent) { - Assert.IsTrue(this.expectedOutput.Count > 0); + Assert.IsNotEmpty(this.expectedOutput); var expectedEvent = this.expectedOutput.Dequeue(); Assert.IsTrue(expectedEvent.Equals(egressEvent)); diff --git a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs index 68c8b6593..6b778f07d 100644 --- a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs +++ b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs @@ -82,8 +82,8 @@ public void LOJ1Row() var query = leftStream.LeftOuterJoin(rightStream, e => e.field1, e => e.field3, (l, r) => l.field2 != "E", - (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, - (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); + (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, + (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); var resultAsync = result.ForEachAsync(o => output.Add(o)); @@ -144,8 +144,8 @@ public void LOJ1RowSmallBatch() var query = leftStream.LeftOuterJoin(rightStream, e => e.field1, e => e.field3, (l, r) => l.field2 != "E", - (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, - (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); + (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, + (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); var resultAsync = result.ForEachAsync(o => output.Add(o)); @@ -205,8 +205,8 @@ public void LOJ1Columnar() var query = leftStream.LeftOuterJoin(rightStream, e => e.field1, e => e.field3, (l, r) => l.field2 != "E", - (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, - (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); + (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, + (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); var resultAsync = result.ForEachAsync(o => output.Add(o)); @@ -267,8 +267,8 @@ public void LOJ1ColumnarSmallBatch() var query = leftStream.LeftOuterJoin(rightStream, e => e.field1, e => e.field3, (l, r) => l.field2 != "E", - (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, - (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); + (l) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = tmp1, field4 = tmp2 }, + (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); var resultAsync = result.ForEachAsync(o => output.Add(o)); diff --git a/Sources/Test/SimpleTesting/MultiStringTests.cs b/Sources/Test/SimpleTesting/MultiStringTests.cs index 4477d88ec..e6d3b6618 100644 --- a/Sources/Test/SimpleTesting/MultiStringTests.cs +++ b/Sources/Test/SimpleTesting/MultiStringTests.cs @@ -609,11 +609,11 @@ public void MultiStringRegex1() { if ((result.col[i >> 6] & (1L << (i & 0x3f))) == 0) { - Assert.IsTrue(input[i].Contains(pattern)); + Assert.Contains(pattern, input[i]); } else { - Assert.IsFalse(input[i].Contains(pattern)); + Assert.DoesNotContain(pattern, input[i]); } } inBV.ReturnClear(); diff --git a/Sources/Test/SimpleTesting/Partitioned/PartitionedIngressAndEgressTestMatrixBases.cs b/Sources/Test/SimpleTesting/Partitioned/PartitionedIngressAndEgressTestMatrixBases.cs index f84057087..f67deef83 100644 --- a/Sources/Test/SimpleTesting/Partitioned/PartitionedIngressAndEgressTestMatrixBases.cs +++ b/Sources/Test/SimpleTesting/Partitioned/PartitionedIngressAndEgressTestMatrixBases.cs @@ -11,7 +11,7 @@ namespace SimpleTesting.PartitionedIngressAndEgress { - public class TriPartitionedOrderedTestsBase : TestWithConfigSettingsAndMemoryLeakDetection + public abstract class TriPartitionedOrderedTestsBase : TestWithConfigSettingsAndMemoryLeakDetection { internal TriPartitionedOrderedTestsBase( ConfigModifier config, @@ -86,8 +86,8 @@ private void ValidateOutput(IList input, IList data.Length, "Flush should push all events out."); + Assert.IsGreaterThan(data.Length, res.Count, "Flush should push all events out."); j.OnCompleted(); } @@ -748,7 +748,7 @@ public void AlterLifeTimeWithFlush() { } - Assert.IsTrue(res.Count > 0, "There should be some results."); + Assert.IsNotEmpty(res, "There should be some results."); } [TestMethod, TestCategory("Gated")] @@ -801,7 +801,7 @@ public void AlterLifeTimeWithFlushDoubles() { } - Assert.IsTrue(res.Count > 0, "There should be some results."); + Assert.IsNotEmpty(res, "There should be some results."); } [TestMethod, TestCategory("Gated")] diff --git a/Sources/Test/SimpleTesting/Serializer/SurrogateTests.cs b/Sources/Test/SimpleTesting/Serializer/SurrogateTests.cs index 975e98e97..ce2bb5b5b 100644 --- a/Sources/Test/SimpleTesting/Serializer/SurrogateTests.cs +++ b/Sources/Test/SimpleTesting/Serializer/SurrogateTests.cs @@ -108,7 +108,7 @@ public void SurrogateTest() input2.OnCompleted(); - Assert.AreEqual(2, output2.Count); + Assert.HasCount(2, output2); Assert.AreEqual(1, output2[0].Payload.GetValue()); Assert.AreEqual(StreamEvent.InfinitySyncTime, output2[1].SyncTime); } diff --git a/Sources/Test/SimpleTesting/SimpleTesting.csproj b/Sources/Test/SimpleTesting/SimpleTesting.csproj index 9b97824ad..179f2df5a 100644 --- a/Sources/Test/SimpleTesting/SimpleTesting.csproj +++ b/Sources/Test/SimpleTesting/SimpleTesting.csproj @@ -1,17 +1,17 @@  - net7.0;net6.0;net472 + net8.0 AnyCPU - - - - - - + + + + + + - - - all - runtime; build; native; contentfiles; analyzers - - - - - $(EnlistmentRoot)\Sources\Microsoft.StreamProcessing.ruleset - diff --git a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj index b4dfea5bb..00948d43b 100644 --- a/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj +++ b/Sources/Core/Microsoft.StreamProcessing.Provider/Microsoft.StreamProcessing.Provider.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 x64;AnyCPU diff --git a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj index f3e5fc326..967913da3 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj +++ b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 x64;AnyCPU diff --git a/Sources/Test/Directory.Build.props b/Sources/Test/Directory.Build.props index 588c632b2..a3b945e01 100644 --- a/Sources/Test/Directory.Build.props +++ b/Sources/Test/Directory.Build.props @@ -28,7 +28,7 @@ - + diff --git a/Sources/Test/Microsoft.StreamProcessing.Test.ruleset b/Sources/Test/Microsoft.StreamProcessing.Test.ruleset index ca4f78706..c656edfee 100644 --- a/Sources/Test/Microsoft.StreamProcessing.Test.ruleset +++ b/Sources/Test/Microsoft.StreamProcessing.Test.ruleset @@ -4,6 +4,6 @@ - + \ No newline at end of file diff --git a/Sources/Test/SimpleTesting/AdHocTests.cs b/Sources/Test/SimpleTesting/AdHocTests.cs index 6c11d45a8..a78baca5e 100644 --- a/Sources/Test/SimpleTesting/AdHocTests.cs +++ b/Sources/Test/SimpleTesting/AdHocTests.cs @@ -44,7 +44,7 @@ public void Properties() .ToObservable() .ToStreamable(DisorderPolicy.Throw(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None(), OnCompletedPolicy.None); - var q2 = q1.Select(x => string.Join(",", x.A, x.B, x.C, x.D, x.E)); + var q2 = q1.Select(x => string.Join(",", new object[] { x.A, x.B, x.C, x.D, x.E })); int count = 0; q2.ToStreamEventObservable().ForEachAsync(x => count++).Wait(); @@ -67,7 +67,7 @@ public void Fields() .ToObservable() .ToStreamable(DisorderPolicy.Throw(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None(), OnCompletedPolicy.None); - var q2 = q1.Select(x => string.Join(",", x.A, x.B, x.C, x.D, x.E)); + var q2 = q1.Select(x => string.Join(",", new object[] { x.A, x.B, x.C, x.D, x.E })); int count = 0; q2.ToStreamEventObservable().ForEachAsync(x => count++).Wait(); diff --git a/Sources/Test/SimpleTesting/SimpleTesting.csproj b/Sources/Test/SimpleTesting/SimpleTesting.csproj index 179f2df5a..cff611c29 100644 --- a/Sources/Test/SimpleTesting/SimpleTesting.csproj +++ b/Sources/Test/SimpleTesting/SimpleTesting.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 AnyCPU @@ -162,7 +162,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Sources/Test/TrillPerf/PerformanceTesting.csproj b/Sources/Test/TrillPerf/PerformanceTesting.csproj index df3472d8d..5268654f5 100644 --- a/Sources/Test/TrillPerf/PerformanceTesting.csproj +++ b/Sources/Test/TrillPerf/PerformanceTesting.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 AnyCPU From b4e281fc5c87d9a434c89f02a0ef1297e37a9ad4 Mon Sep 17 00:00:00 2001 From: Amir Burbea Date: Mon, 23 Mar 2026 21:18:55 -0700 Subject: [PATCH 07/11] Eliminate heap allocations in BinaryDecoder/BinaryEncoder hot paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BinaryDecoder: - DecodeFloat, DecodeDouble, DecodeGuid, ReadIntFixed: replace new byte[] with stackalloc Span; add Span overload of ReadAllRequiredBytes - DecodeString: bypass DecodeByteArray, rent from ArrayPool, decode string, return buffer — avoids a heap allocation per string field BinaryEncoder: - Encode(float): replace BitConverter.GetBytes (allocates) with stackalloc + BitConverter.TryWriteBytes - Encode(Guid): replace ToByteArray() (allocates) with stackalloc + TryWriteBytes - Encode(string): replace Encoding.UTF8.GetBytes(string) (allocates) with ArrayPool rent, encode into span, delegate to Encode(ReadOnlySpan) --- .../Serializer/Encoders/BinaryDecoder.cs | 53 +++++++++++++------ .../Serializer/Encoders/BinaryEncoder.cs | 44 +++++++++++---- 2 files changed, 73 insertions(+), 24 deletions(-) diff --git a/Sources/Core/Microsoft.StreamProcessing/Serializer/Encoders/BinaryDecoder.cs b/Sources/Core/Microsoft.StreamProcessing/Serializer/Encoders/BinaryDecoder.cs index 8392f8475..35880a25c 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Serializer/Encoders/BinaryDecoder.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Serializer/Encoders/BinaryDecoder.cs @@ -3,6 +3,7 @@ // Licensed under the MIT License // ********************************************************************* using System; +using System.Buffers; using System.IO; using System.Runtime.Serialization; using System.Text; @@ -110,18 +111,15 @@ public ulong DecodeULong() public float DecodeFloat() { - var value = new byte[4]; + Span value = stackalloc byte[4]; ReadAllRequiredBytes(value); - if (!BitConverter.IsLittleEndian) - { - Array.Reverse(value); - } - return BitConverter.ToSingle(value, 0); + if (!BitConverter.IsLittleEndian) value.Reverse(); + return BitConverter.ToSingle(value); } public double DecodeDouble() { - var value = new byte[8]; + Span value = stackalloc byte[8]; ReadAllRequiredBytes(value); long longValue = value[0] | (long)value[1] << 0x8 @@ -142,7 +140,21 @@ public byte[] DecodeByteArray() return array; } - public string DecodeString() => Encoding.UTF8.GetString(DecodeByteArray()); + public string DecodeString() + { + int byteCount = DecodeInt(); + if (byteCount == 0) return string.Empty; + var rented = ArrayPool.Shared.Rent(byteCount); + try + { + ReadAllRequiredBytes(rented.AsSpan(0, byteCount)); + return Encoding.UTF8.GetString(rented, 0, byteCount); + } + finally + { + ArrayPool.Shared.Return(rented); + } + } public int DecodeArrayChunk() { @@ -157,9 +169,9 @@ public int DecodeArrayChunk() public Guid DecodeGuid() { - var array = new byte[16]; - ReadAllRequiredBytes(array); - return new Guid(array); + Span value = stackalloc byte[16]; + ReadAllRequiredBytes(value); + return new Guid(value); } private void ReadAllRequiredBytes(byte[] array) @@ -172,15 +184,26 @@ private void ReadAllRequiredBytes(byte[] array) } } + private void ReadAllRequiredBytes(Span span) + { + int totalRead = 0; + while (totalRead < span.Length) + { + int read = this.stream.Read(span.Slice(totalRead)); + if (read == 0) + throw new SerializationException($"Unexpected end of stream: '{span.Length - totalRead}' bytes missing."); + totalRead += read; + } + } + private int ReadIntFixed() { - var value = new byte[4]; - this.stream.ReadAllRequiredBytes(value, 0, value.Length); - int intValue = value[0] + Span value = stackalloc byte[4]; + ReadAllRequiredBytes(value); + return value[0] | value[1] << 0x8 | value[2] << 0x10 | value[3] << 0x18; - return intValue; } public unsafe T[] DecodeArray() where T : struct diff --git a/Sources/Core/Microsoft.StreamProcessing/Serializer/Encoders/BinaryEncoder.cs b/Sources/Core/Microsoft.StreamProcessing/Serializer/Encoders/BinaryEncoder.cs index dd944275e..902c15699 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Serializer/Encoders/BinaryEncoder.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Serializer/Encoders/BinaryEncoder.cs @@ -3,6 +3,7 @@ // Licensed under the MIT License // ********************************************************************* using System; +using System.Buffers; using System.IO; using System.Text; using Microsoft.StreamProcessing.Internal; @@ -83,13 +84,10 @@ public void Encode(ulong value) public void Encode(float value) { - byte[] bytes = BitConverter.GetBytes(value); - if (!BitConverter.IsLittleEndian) - { - Array.Reverse(bytes); - } - - this.stream.Write(bytes, 0, bytes.Length); + Span bytes = stackalloc byte[4]; + BitConverter.TryWriteBytes(bytes, value); + if (!BitConverter.IsLittleEndian) bytes.Reverse(); + this.stream.Write(bytes); } public void Encode(double value) @@ -113,12 +111,40 @@ public void Encode(byte[] value) if (value.Length > 0) this.stream.Write(value, 0, value.Length); } + public void Encode(ReadOnlySpan span) + { + int count = span.Length; + Encode(count); + if (count > 0) + { + this.stream.Write(span); + } + } + public void Encode(string value) - => Encode(Encoding.UTF8.GetBytes(value ?? throw new ArgumentNullException(nameof(value)))); + { + if (value == null) throw new ArgumentNullException(nameof(value)); + int byteCount = Encoding.UTF8.GetByteCount(value); + var rented = ArrayPool.Shared.Rent(byteCount); + try + { + int written = Encoding.UTF8.GetBytes(value, rented); + Encode(rented.AsSpan(0, written)); + } + finally + { + ArrayPool.Shared.Return(rented); + } + } public void EncodeArrayChunk(int size) => Encode(size); - public void Encode(Guid value) => this.stream.Write(value.ToByteArray(), 0, 16); + public void Encode(Guid value) + { + Span bytes = stackalloc byte[16]; + value.TryWriteBytes(bytes); + this.stream.Write(bytes); + } private void WriteIntFixed(int encodedValue) { From e86158af7e28f43000d1eb8f72fb604775cf19a9 Mon Sep 17 00:00:00 2001 From: Amir Burbea Date: Mon, 23 Mar 2026 23:03:31 -0700 Subject: [PATCH 08/11] Fix JoinTestWithException to be deterministic across test orderings The codegen cache (EquiJoinStreamable.cachedPipes) persisted across tests in the same process, causing JoinTestWithException to silently succeed (no exception thrown) when a compatible join had already been compiled by an earlier test. Fix: add internal Clear() to SafeConcurrentDictionary, expose cachedPipes as internal on EquiJoinStreamable, and clear the exact cache instance in [TestInitialize] before each run. The test now uses a named JoinResult struct so the closed generic type can be referenced at compile time, and asserts the StreamProcessingException is always thrown. --- .../Collections/SafeConcurrentDictionary.cs | 12 ++++++ .../Operators/EquiJoin/EquiJoinStreamable.cs | 6 ++- Sources/Test/SimpleTesting/AdHocTests.cs | 41 ++++++++++++------- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/SafeConcurrentDictionary.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/SafeConcurrentDictionary.cs index 9b04f7206..153890de3 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/SafeConcurrentDictionary.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/SafeConcurrentDictionary.cs @@ -44,6 +44,18 @@ public TValue GetOrAdd(CacheKey key, Func valueFactory) [MethodImpl(MethodImplOptions.AggressiveInlining)] public IEnumerator> GetEnumerator() => this.dictionary.GetEnumerator(); + /// + /// Clears all entries from the dictionary and the per-key lock table. + /// Marked internal (not private) so that test code can clear the codegen cache + /// (e.g. EquiJoinStreamable.cachedPipes) to ensure deterministic test behavior + /// without relying on reflection. + /// + internal void Clear() + { + this.dictionary.Clear(); + this.keyLocks.Clear(); + } + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); /// diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/EquiJoinStreamable.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/EquiJoinStreamable.cs index 4624db258..9c049504f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/EquiJoinStreamable.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/EquiJoinStreamable.cs @@ -11,8 +11,10 @@ namespace Microsoft.StreamProcessing { internal sealed class EquiJoinStreamable : BinaryStreamable { - private static readonly SafeConcurrentDictionary> cachedPipes - = new SafeConcurrentDictionary>(); + // Internal (not private) so test code can call cachedPipes.Clear() to ensure + // deterministic behavior in tests that depend on a fresh codegen compile. + internal static readonly SafeConcurrentDictionary> cachedPipes + = new SafeConcurrentDictionary>(); private readonly JoinKind joinKind; private readonly Func> columnarGenerator; diff --git a/Sources/Test/SimpleTesting/AdHocTests.cs b/Sources/Test/SimpleTesting/AdHocTests.cs index a78baca5e..f201a7204 100644 --- a/Sources/Test/SimpleTesting/AdHocTests.cs +++ b/Sources/Test/SimpleTesting/AdHocTests.cs @@ -2325,6 +2325,21 @@ public class LeftComparerPayload_WithCodegen : TestWithConfigSettingsAndMemoryLe public LeftComparerPayload_WithCodegen() : base(new ConfigModifier().DontFallBackToRowBasedExecution(true)) { } + // Named result type so the full closed generic EquiJoinStreamable<,,,,> can be + // referenced at compile time (anonymous types cannot be named in typeof/generic arguments). + public struct JoinResult { public int LeftX; public int RightX; } + + [TestInitialize] + public void ClearCodegenCache() + { + // Clear the EquiJoin codegen cache before each test so that JoinTestWithException + // always triggers a fresh compile and deterministically throws StreamProcessingException, + // regardless of which tests ran before it in the same process. + // The join is built via Map+Reduce, so the inner EquiJoinStreamable uses TKey=CompoundGroupKey. + EquiJoinStreamable, ClassOverridingEquals, int, JoinResult> + .cachedPipes.Clear(); + } + public class ClassOverridingEquals { public int x; @@ -2334,9 +2349,10 @@ public class ClassOverridingEquals } /// - /// This test has a left comparer which has a reference to the left - /// payload instead of just to its fields. This causes the streamable - /// to thrown an exception. + /// This test has a left comparer which has a reference to the left payload instead of + /// just to its fields. Codegen should always throw StreamProcessingException when + /// compiling this join fresh. The [TestInitialize] method clears the codegen cache + /// before this test runs to ensure deterministic behavior in the full test suite. /// [TestMethod] public void JoinTestWithException() @@ -2353,20 +2369,17 @@ public void JoinTestWithException() .ToStreamable() ; - bool exceptionHappened = false; + bool threw = false; try { - var result = stream1 - .Join(stream2, e => e.x, e => e, (left, right) => new { LeftX = left.x, RightX = right, }) - .ToStreamEventObservable() - .ToEnumerable() - .ToArray(); - } - catch (StreamProcessingException) - { - exceptionHappened = true; + stream1 + .Join(stream2, e => e.x, e => e, (left, right) => new JoinResult { LeftX = left.x, RightX = right }) + .ToStreamEventObservable() + .ToEnumerable() + .ToArray(); } - Assert.IsTrue(exceptionHappened); + catch (StreamProcessingException) { threw = true; } + Assert.IsTrue(threw, "Expected StreamProcessingException from codegen failure on ClassOverridingEquals"); } } From f05cf2dc34205985f3c97b4e1a66b025c913f872 Mon Sep 17 00:00:00 2001 From: Amir Burbea Date: Thu, 26 Mar 2026 15:07:49 -0700 Subject: [PATCH 09/11] Fix long standing bug in CountAggregate where Sum was accidentally implemented with - instead of +. SimpleTesting does not have a test for this. --- .../Microsoft.StreamProcessing/Aggregates/CountAggregate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Core/Microsoft.StreamProcessing/Aggregates/CountAggregate.cs b/Sources/Core/Microsoft.StreamProcessing/Aggregates/CountAggregate.cs index db3e0ab86..d4ab16d42 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Aggregates/CountAggregate.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Aggregates/CountAggregate.cs @@ -21,7 +21,7 @@ internal sealed class CountAggregate : ISummableAggregate> diff = (leftCount, rightCount) => leftCount - rightCount; public Expression> Difference() => diff; - private static readonly Expression> sum = (leftCount, rightCount) => leftCount - rightCount; + private static readonly Expression> sum = (leftCount, rightCount) => leftCount + rightCount; public Expression> Sum() => sum; private static readonly Expression> res = count => count; From a07b6d5921ecddcf7d4dcbe71c14f7405179158d Mon Sep 17 00:00:00 2001 From: Amir Burbea Date: Fri, 27 Mar 2026 08:03:21 -0700 Subject: [PATCH 10/11] Refactor: use method groups & C# 12 collection expressions and span/stackalloc Begin to modernize codebase by replacing lambda expressions with method group references in ForEachAsync, Subscribe, and similar calls. Update collection initializations to use C# 12 collection expressions for improved readability. Use targeted new in several places. Remove StyleCop.Analyzers references from project files, and update Main method and array initializations in Program.cs. Checkpoint related version headers are now sent/received via stack allocated spans as opposed to byte[]. --- Sources/.editorconfig | 10 - .../Collections/MultiSet.cs | 2 +- .../Collections/PriorityQueue.cs | 2 +- .../Collections/SortedMultiSet.cs | 2 +- .../Egress/Atemporal/AtemporalEgressPipe.cs | 4 +- .../AtemporalArrayEgressPipe.cs | 4 +- .../AtemporalEnumerableEgressPipe.cs | 8 +- .../Fusible/FuseModule.cs | 2 +- .../Ingress/Binary/StreamableSerializer.cs | 4 +- .../Ingress/DiagnosticObservable.cs | 4 +- .../Ingress/ImpatienceSorter.cs | 8 +- .../Ingress/SubscriptionBase.cs | 24 +- .../Ingress/SubscriptionBase.tt | 4 - .../Temporal/TemporalIngressSubscription.cs | 60 +- .../Microsoft.StreamProcessing.csproj | 20 + .../Operators/Afa/AfaDescriptor.cs | 6 +- .../Afa/AfaMultiEventListTransformer.cs | 4 +- .../Operators/Afa/AfaTransformer.cs | 4 +- .../Afa/CompiledUngroupedAfaPipe_EventList.cs | 4 +- ...CompiledUngroupedAfaPipe_MultiEventList.cs | 2 +- .../Afa/GroupedAfaMultiEventTransformer.cs | 4 +- .../Operators/Clip/PartitionedClipJoinPipe.cs | 6 +- .../ClipByConstant/ClipByConstantPipe.cs | 2 +- .../PartitionedClipByConstantPipe.cs | 2 +- .../EndEdgeFreeOutputPipe.cs | 2 +- .../PartitionedEndEdgeFreeOutputPipe.cs | 2 +- .../EquiJoin/Basic/PartitionedEquiJoinPipe.cs | 6 +- .../Basic/PartitionedEquiJoinPipeCompound.cs | 6 +- .../Basic/PartitionedEquiJoinPipeSimple.cs | 6 +- .../PartitionedFixedIntervalEquiJoinPipe.cs | 6 +- ...tionedFixedIntervalEquiJoinPipeCompound.cs | 6 +- ...titionedFixedIntervalEquiJoinPipeSimple.cs | 6 +- .../IncreasingOrderEquiJoinPipe.cs | 4 +- .../PartitionedStartEdgeEquiJoinPipe.cs | 10 +- .../ExtendLifetimeNegativePipe.cs | 2 +- .../PartitionedExtendLifetimeNegativePipe.cs | 2 +- .../PartitionedLeftAntiSemiJoinPipe.cs | 10 +- .../Multicast/DependentStreamable.cs | 4 +- .../PartitionedSessionWindowPipe.cs | 2 +- .../Operators/Shuffle/ShufflePipe.cs | 8 +- .../Operators/Shufflecast/ShufflecastPipe.cs | 2 +- .../SnapshotWindow/AggregateTempateClasses.cs | 2 +- .../PartitionedSnapshotWindowHoppingPipe.cs | 2 +- .../Hopping/SnapshotWindowHoppingPipe.cs | 2 +- ...titionedSnapshotWindowPriorityQueuePipe.cs | 4 +- ...edSnapshotWindowPriorityQueuePipeSimple.cs | 2 +- .../SnapshotWindowPriorityQueuePipe.cs | 4 +- .../SnapshotWindowPriorityQueuePipeSimple.cs | 2 +- .../PartitionedSnapshotWindowSlidingPipe.cs | 4 +- ...titionedSnapshotWindowSlidingPipeSimple.cs | 2 +- .../Sliding/SnapshotWindowSlidingPipe.cs | 4 +- .../SnapshotWindowSlidingPipeSimple.cs | 2 +- .../PartitionedSnapshotWindowStartEdgePipe.cs | 2 +- .../StartEdge/SnapshotWindowStartEdgePipe.cs | 2 +- .../SprayGroupImport/SprayGroupImportPipe.cs | 2 +- .../Operators/Stitch/PartitionedStitchPipe.cs | 4 +- .../Operators/Stitch/StitchPipe.cs | 4 +- .../Operators/Union/PartitionedUnionPipe.cs | 10 +- .../Operators/Where/MultiStringTransforms.cs | 6 +- .../Pipes/BinaryPlanNode.cs | 2 +- .../QueryContainer.cs | 163 ++--- .../FastDictionaryGenerator.cs | 6 +- .../SortedDictionaryGenerator.cs | 2 +- .../Serializer/Serializers/ClassSerializer.cs | 2 +- .../MultidimensionalArraySerializer.cs | 4 +- .../Serializers/ReflectionSchemaBuilder.cs | 2 +- .../Sharding/ShardedStreamCache.cs | 2 +- .../StreamProperties/StreamProperties.cs | 22 +- .../StreamPropertiesExtensions.cs | 8 +- .../StreamableAPI/PivotExtensions.cs | 4 +- .../Transformer/CommonBaseTemplate.cs | 2 +- .../Transformer/SelectTransformation.cs | 10 +- .../Transformer/TemplateClasses.cs | 16 +- .../Utilities/Config.cs | 2 +- .../Utilities/ExpressionExtensions.cs | 14 +- .../Utilities/TypeExtensions.cs | 10 +- .../Utilities/Utility.cs | 2 +- Sources/Microsoft.StreamProcessing.ruleset | 198 ----- Sources/Test/Directory.Build.props | 5 - .../Microsoft.StreamProcessing.Test.ruleset | 9 - Sources/Test/SimpleTesting/AdHocTests.cs | 43 +- .../Aggregates/PerKeyAggregate.cs | 4 +- .../SimpleTesting/CheckpointRestoreTests.cs | 680 +++++++++--------- Sources/Test/SimpleTesting/ColumnarTests.cs | 17 +- .../Test/SimpleTesting/GlobalSuppressions.cs | 24 - .../DisorderedIngressAndEgressTests.cs | 192 ++--- .../FlushPolicyTestMatrixBase.cs | 2 +- .../IngressEgress/IngressAndEgressTests.cs | 24 +- .../Macros/LeftOuterJoinTests.cs | 8 +- ...titionedIngressAndEgressTestMatrixBases.cs | 4 +- .../Partitioned/PartitionedStreamTests.cs | 2 +- Sources/Test/SimpleTesting/Program.cs | 8 +- .../Serializer/SerializabilityTypeScan.cs | 2 +- .../Serializer/SurrogateTests.cs | 4 +- Sources/Test/SimpleTesting/SimpleTests.cs | 16 +- Sources/Test/SimpleTesting/SnapshotTests.cs | 16 +- .../Streamables/DisjointUnionTest.cs | 6 +- .../Streamables/EquiJoinStreamableTest.cs | 4 +- .../Streamables/ExtendLifetimeTest.cs | 2 +- .../SimpleTesting/Streamables/JoinTests.cs | 288 ++++---- .../Streamables/PointAtEndTest.cs | 2 +- .../Test/TrillPerf/PerformanceTesting.csproj | 7 - 102 files changed, 962 insertions(+), 1214 deletions(-) delete mode 100644 Sources/Microsoft.StreamProcessing.ruleset delete mode 100644 Sources/Test/Microsoft.StreamProcessing.Test.ruleset delete mode 100644 Sources/Test/SimpleTesting/GlobalSuppressions.cs diff --git a/Sources/.editorconfig b/Sources/.editorconfig index 116ea2776..d1110ea7e 100644 --- a/Sources/.editorconfig +++ b/Sources/.editorconfig @@ -51,13 +51,3 @@ csharp_new_line_before_finally = true csharp_indent_case_contents = true csharp_indent_switch_labels = true csharp_preserve_single_line_statements = false -[*.cs] - -# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.NamingRules' -dotnet_analyzer_diagnostic.category-StyleCop.CSharp.NamingRules.severity = none - -# Default severity for all analyzer diagnostics -dotnet_analyzer_diagnostic.severity = none - -# SA1314: Type parameter names should begin with T -dotnet_diagnostic.SA1314.severity = none diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/MultiSet.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/MultiSet.cs index 150de6cdb..78bcd584f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/MultiSet.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/MultiSet.cs @@ -20,7 +20,7 @@ public sealed class MultiSet { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Justification = "Used to avoid creating redundant readonly property.")] [DataMember] - private Dictionary Elements = new Dictionary(); + private Dictionary Elements = []; [DataMember] private long count; diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/PriorityQueue.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/PriorityQueue.cs index e1473d70c..26249d19d 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/PriorityQueue.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/PriorityQueue.cs @@ -18,7 +18,7 @@ namespace Microsoft.StreamProcessing public class PriorityQueue : IEnumerable { [DataMember] - private List data = new List(); + private List data = []; private readonly IComparer comp; diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/SortedMultiSet.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/SortedMultiSet.cs index 84ff1aeaf..f187d7fd2 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/SortedMultiSet.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/SortedMultiSet.cs @@ -47,7 +47,7 @@ private static Func, IEnumerable /// Creates a new instance of a Sorted Multiset. /// [EditorBrowsable(EditorBrowsableState.Never)] - public SortedMultiSet() : this(() => new SortedDictionary()) { } + public SortedMultiSet() : this(() => []) { } /// /// Creates a new instance of a Sorted Multiset where the underlying dictionary is generated. diff --git a/Sources/Core/Microsoft.StreamProcessing/Egress/Atemporal/AtemporalEgressPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Egress/Atemporal/AtemporalEgressPipe.cs index 4540cae25..1f1254e9e 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Egress/Atemporal/AtemporalEgressPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Egress/Atemporal/AtemporalEgressPipe.cs @@ -14,7 +14,7 @@ namespace Microsoft.StreamProcessing internal sealed class MonotonicEgressPipe : EgressBoundary { [DataMember] - private SortedDictionary> toDelete = new SortedDictionary>(); + private SortedDictionary> toDelete = []; [Obsolete("Used only by serialization. Do not call directly.")] public MonotonicEgressPipe() { } @@ -76,7 +76,7 @@ private void EnqueueDelete(long currentTime, TPayload payload) { if (!this.toDelete.TryGetValue(currentTime, out List queue)) { - queue = new List(); + queue = []; this.toDelete.Add(currentTime, queue); } queue.Add(payload); diff --git a/Sources/Core/Microsoft.StreamProcessing/Egress/AtemporalArray/AtemporalArrayEgressPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Egress/AtemporalArray/AtemporalArrayEgressPipe.cs index 76c7c3a96..540881456 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Egress/AtemporalArray/AtemporalArrayEgressPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Egress/AtemporalArray/AtemporalArrayEgressPipe.cs @@ -14,7 +14,7 @@ namespace Microsoft.StreamProcessing internal sealed class MonotonicArrayEgressPipe : EgressBoundary> { [DataMember] - private SortedDictionary> toDelete = new SortedDictionary>(); + private SortedDictionary> toDelete = []; private readonly Func generator; [DataMember] @@ -105,7 +105,7 @@ private void EnqueueDelete(long currentTime, TPayload payload) { if (!this.toDelete.TryGetValue(currentTime, out List queue)) { - queue = new List(); + queue = []; this.toDelete.Add(currentTime, queue); } queue.Add(payload); diff --git a/Sources/Core/Microsoft.StreamProcessing/Egress/AtemporalEnumerable/AtemporalEnumerableEgressPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Egress/AtemporalEnumerable/AtemporalEnumerableEgressPipe.cs index be9cb4878..0c6aa082f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Egress/AtemporalEnumerable/AtemporalEnumerableEgressPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Egress/AtemporalEnumerable/AtemporalEnumerableEgressPipe.cs @@ -16,9 +16,9 @@ internal sealed class AtemporalEnumerableEgressPipe : EgressBoundary> toDelete = new SortedDictionary>(); + private SortedDictionary> toDelete = []; [DataMember] - private List> currentVersion = new List>(); + private List> currentVersion = []; [Obsolete("Used only by serialization. Do not call directly.")] public AtemporalEnumerableEgressPipe() { } @@ -86,7 +86,7 @@ private void Process(long timestamp) if (this.currentVersion.Count > 0) { this.observer.OnNext(this.currentVersion); - this.currentVersion = new List>(); + this.currentVersion = []; } } } @@ -95,7 +95,7 @@ private void EnqueueDelete(long currentTime, TPayload payload) { if (!this.toDelete.TryGetValue(currentTime, out List queue)) { - queue = new List(); + queue = []; this.toDelete.Add(currentTime, queue); } queue.Add(payload); diff --git a/Sources/Core/Microsoft.StreamProcessing/Fusible/FuseModule.cs b/Sources/Core/Microsoft.StreamProcessing/Fusible/FuseModule.cs index 34b45a8a4..f17785374 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Fusible/FuseModule.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Fusible/FuseModule.cs @@ -19,7 +19,7 @@ internal static class PlaceholderMethod internal sealed class FuseModule { - private readonly List expressions = new List(); + private readonly List expressions = []; private Expression durationAdjustment = null; public FuseModule() { } diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/Binary/StreamableSerializer.cs b/Sources/Core/Microsoft.StreamProcessing/Ingress/Binary/StreamableSerializer.cs index 1a272a0a6..cf0e22a3f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/Binary/StreamableSerializer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/Binary/StreamableSerializer.cs @@ -32,8 +32,8 @@ public StreamProperties ToStreamProperties() EqualityComparerExpression.Default, EqualityComparerExpression.Default, null, null, - new Dictionary(), - new Dictionary(), + [], + [], null); public bool IsColumnar; diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/DiagnosticObservable.cs b/Sources/Core/Microsoft.StreamProcessing/Ingress/DiagnosticObservable.cs index c5fb8f4c3..8a76755e1 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/DiagnosticObservable.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/DiagnosticObservable.cs @@ -10,7 +10,7 @@ namespace Microsoft.StreamProcessing { internal sealed class DiagnosticObservable : IObservable>, IObserver>, IDisposable { - private List>> observers = new List>>(); + private List>> observers = []; public IDisposable Subscribe(IObserver> observer) { @@ -83,7 +83,7 @@ public static OutOfOrderStreamEvent Create(StreamEvent : IObservable>, IObserver>, IDisposable { - private List>> observers = new List>>(); + private List>> observers = []; public IDisposable Subscribe(IObserver> observer) { diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/ImpatienceSorter.cs b/Sources/Core/Microsoft.StreamProcessing/Ingress/ImpatienceSorter.cs index d260f3fe8..df7fab8d9 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/ImpatienceSorter.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/ImpatienceSorter.cs @@ -35,7 +35,7 @@ public sealed class ImpatienceSorter : IDisposable private DataStructurePool>> ecbPool; private List>> toReturn = - new List>>(); + []; /// /// Currently for internal use only - do not use directly. @@ -44,7 +44,7 @@ public sealed class ImpatienceSorter : IDisposable public ImpatienceSorter() { this.Tails = new long[this.MaxFibers]; - this.Fibers = new List>>(); + this.Fibers = []; this.MergeSource = new PooledElasticCircularBuffer>[this.MaxFibers]; this.NextAffectingSyncTime = StreamEvent.InfinitySyncTime; this.ecbPool = new DataStructurePool>>(); @@ -442,7 +442,7 @@ private sealed class ImpatienceSorter : IDisposable private DataStructurePool>> ecbPool; private List>> toReturn = - new List>>(); + []; /// /// Currently for internal use only - do not use directly. @@ -451,7 +451,7 @@ private sealed class ImpatienceSorter : IDisposable public ImpatienceSorter() { this.Tails = new long[this.MaxFibers]; - this.Fibers = new List>>(); + this.Fibers = []; this.MergeSource = new PooledElasticCircularBuffer>[this.MaxFibers]; this.NextAffectingSyncTime = StreamEvent.InfinitySyncTime; this.ecbPool = new DataStructurePool>>(); diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/SubscriptionBase.cs b/Sources/Core/Microsoft.StreamProcessing/Ingress/SubscriptionBase.cs index bb48d50f5..946aa8b66 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/SubscriptionBase.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/SubscriptionBase.cs @@ -1130,8 +1130,6 @@ protected DisorderedPartitionedObserverSubscriptionBase( /// /// [EditorBrowsable(EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1008:OpeningParenthesisMustBeSpacedCorrectly", Justification = "ValueTuples")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1009:ClosingParenthesisMustBeSpacedCorrectly", Justification = "ValueTuples")] public abstract class DisorderedPartitionedSubscriptionBase : Pipe, TResult>, IIngressStreamObserver { private readonly string errorMessages; @@ -1212,7 +1210,7 @@ public abstract class DisorderedPartitionedSubscriptionBase [EditorBrowsable(EditorBrowsableState.Never)] [DataMember] - protected Dictionary currentTime = new Dictionary(); + protected Dictionary currentTime = []; #if DEBUG /// @@ -1221,7 +1219,7 @@ public abstract class DisorderedPartitionedSubscriptionBase [EditorBrowsable(EditorBrowsableState.Never)] [DataMember] - protected Dictionary lastEventTime = new Dictionary(); + protected Dictionary lastEventTime = []; #endif /// @@ -1235,7 +1233,7 @@ public abstract class DisorderedPartitionedSubscriptionBase [DataMember] - protected Dictionary lastPunctuationTime = new Dictionary(); + protected Dictionary lastPunctuationTime = []; /// /// Currently for internal use only - do not use directly. @@ -1251,7 +1249,7 @@ public abstract class DisorderedPartitionedSubscriptionBase [EditorBrowsable(EditorBrowsableState.Never)] [DataMember] - protected Dictionary partitionHighWatermarks = new Dictionary(); + protected Dictionary partitionHighWatermarks = []; /// /// Currently for internal use only - do not use directly. @@ -1260,7 +1258,7 @@ public abstract class DisorderedPartitionedSubscriptionBase [EditorBrowsable(EditorBrowsableState.Never)] - protected SortedDictionary> highWatermarkToPartitionsMap = new SortedDictionary>(); + protected SortedDictionary> highWatermarkToPartitionsMap = []; /// /// Currently for internal use only - do not use directly. @@ -1751,8 +1749,6 @@ protected PartitionedObserverSubscriptionBase( /// /// [EditorBrowsable(EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1008:OpeningParenthesisMustBeSpacedCorrectly", Justification = "ValueTuples")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1009:ClosingParenthesisMustBeSpacedCorrectly", Justification = "ValueTuples")] public abstract class PartitionedSubscriptionBase : Pipe, TResult>, IIngressStreamObserver { private readonly string errorMessages; @@ -1833,7 +1829,7 @@ public abstract class PartitionedSubscriptionBase [EditorBrowsable(EditorBrowsableState.Never)] [DataMember] - protected Dictionary currentTime = new Dictionary(); + protected Dictionary currentTime = []; #if DEBUG /// @@ -1842,7 +1838,7 @@ public abstract class PartitionedSubscriptionBase [EditorBrowsable(EditorBrowsableState.Never)] [DataMember] - protected Dictionary lastEventTime = new Dictionary(); + protected Dictionary lastEventTime = []; #endif /// @@ -1856,7 +1852,7 @@ public abstract class PartitionedSubscriptionBase [DataMember] - protected Dictionary lastPunctuationTime = new Dictionary(); + protected Dictionary lastPunctuationTime = []; /// /// Currently for internal use only - do not use directly. @@ -1872,7 +1868,7 @@ public abstract class PartitionedSubscriptionBase [EditorBrowsable(EditorBrowsableState.Never)] [DataMember] - protected Dictionary partitionHighWatermarks = new Dictionary(); + protected Dictionary partitionHighWatermarks = []; /// /// Currently for internal use only - do not use directly. @@ -1881,7 +1877,7 @@ public abstract class PartitionedSubscriptionBase [EditorBrowsable(EditorBrowsableState.Never)] - protected SortedDictionary> highWatermarkToPartitionsMap = new SortedDictionary>(); + protected SortedDictionary> highWatermarkToPartitionsMap = []; /// /// Currently for internal use only - do not use directly. diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/SubscriptionBase.tt b/Sources/Core/Microsoft.StreamProcessing/Ingress/SubscriptionBase.tt index 24a48ff78..9093db423 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/SubscriptionBase.tt +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/SubscriptionBase.tt @@ -135,10 +135,6 @@ foreach (bool disordered in new[] { true, false }) /// /// [EditorBrowsable(EditorBrowsableState.Never)] -<# if (partitioned) { #> - [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1008:OpeningParenthesisMustBeSpacedCorrectly", Justification = "ValueTuples")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1009:ClosingParenthesisMustBeSpacedCorrectly", Justification = "ValueTuples")] -<# } #> public abstract class <#= disordered ? "Disordered" : string.Empty #><#= partitionString #>SubscriptionBase<<#= genericArgument #>TIngressStructure, TPayload, TResult> : Pipe<<#= baseType #>, TResult>, IIngressStreamObserver { private readonly string errorMessages; diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/Temporal/TemporalIngressSubscription.cs b/Sources/Core/Microsoft.StreamProcessing/Ingress/Temporal/TemporalIngressSubscription.cs index 3673529e5..a36e05838 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/Temporal/TemporalIngressSubscription.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/Temporal/TemporalIngressSubscription.cs @@ -380,7 +380,7 @@ private void Process(ref StreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -763,7 +763,7 @@ private void Process(ref StreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -1144,7 +1144,7 @@ private void Process(ref StreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -1435,7 +1435,7 @@ public override void OnNext(StreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -1715,7 +1715,7 @@ public override void OnNext(StreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -1993,7 +1993,7 @@ private void Action(long start, long end, TResult payload, Empty actionKey) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -3722,7 +3722,7 @@ public override void OnNext(PartitionedStreamEvent value) this.partitionHighWatermarks.Add(value.PartitionKey, this.lowWatermark.rawValue); if (this.highWatermarkToPartitionsMap.TryGetValue(this.lowWatermark.rawValue, out HashSet keySet)) keySet.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, [value.PartitionKey]); } long moveTo = moveFrom; @@ -3743,7 +3743,7 @@ public override void OnNext(PartitionedStreamEvent value) else oldSet.Remove(value.PartitionKey); if (this.highWatermarkToPartitionsMap.TryGetValue(value.SyncTime, out HashSet set)) set.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(value.SyncTime, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(value.SyncTime, [value.PartitionKey]); if (value.IsData) { @@ -3864,7 +3864,7 @@ private void Process(ref PartitionedStreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -4114,7 +4114,7 @@ protected override void UpdatePointers() if (this.highWatermarkToPartitionsMap.TryGetValue(kvp.Value, out HashSet set)) set.Add(kvp.Key); else - this.highWatermarkToPartitionsMap.Add(kvp.Value, new HashSet { kvp.Key }); + this.highWatermarkToPartitionsMap.Add(kvp.Value, [kvp.Key]); } } @@ -4216,7 +4216,7 @@ public override void OnNext(PartitionedStreamEvent value) this.partitionHighWatermarks.Add(value.PartitionKey, this.lowWatermark.rawValue); if (this.highWatermarkToPartitionsMap.TryGetValue(this.lowWatermark.rawValue, out HashSet keySet)) keySet.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, [value.PartitionKey]); } long moveTo = moveFrom; @@ -4237,7 +4237,7 @@ public override void OnNext(PartitionedStreamEvent value) else oldSet.Remove(value.PartitionKey); if (this.highWatermarkToPartitionsMap.TryGetValue(value.SyncTime, out HashSet set)) set.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(value.SyncTime, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(value.SyncTime, [value.PartitionKey]); if (value.IsData) { @@ -4358,7 +4358,7 @@ private void Process(ref PartitionedStreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -4603,7 +4603,7 @@ protected override void UpdatePointers() if (this.highWatermarkToPartitionsMap.TryGetValue(kvp.Value, out HashSet set)) set.Add(kvp.Key); else - this.highWatermarkToPartitionsMap.Add(kvp.Value, new HashSet { kvp.Key }); + this.highWatermarkToPartitionsMap.Add(kvp.Value, [kvp.Key]); } } @@ -4708,7 +4708,7 @@ private void Action(long start, long end, TResult payload, PartitionKey ac this.partitionHighWatermarks.Add(value.PartitionKey, this.lowWatermark.rawValue); if (this.highWatermarkToPartitionsMap.TryGetValue(this.lowWatermark.rawValue, out HashSet keySet)) keySet.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, [value.PartitionKey]); } long moveTo = moveFrom; @@ -4729,7 +4729,7 @@ private void Action(long start, long end, TResult payload, PartitionKey ac else oldSet.Remove(value.PartitionKey); if (this.highWatermarkToPartitionsMap.TryGetValue(value.SyncTime, out HashSet set)) set.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(value.SyncTime, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(value.SyncTime, [value.PartitionKey]); if (value.IsData) { @@ -4850,7 +4850,7 @@ private void Process(ref PartitionedStreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -5100,7 +5100,7 @@ protected override void UpdatePointers() if (this.highWatermarkToPartitionsMap.TryGetValue(kvp.Value, out HashSet set)) set.Add(kvp.Key); else - this.highWatermarkToPartitionsMap.Add(kvp.Value, new HashSet { kvp.Key }); + this.highWatermarkToPartitionsMap.Add(kvp.Value, [kvp.Key]); } } @@ -5225,7 +5225,7 @@ public override void OnNext(PartitionedStreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -5542,7 +5542,7 @@ public override void OnNext(PartitionedStreamEvent value) key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -5857,7 +5857,7 @@ private void Action(long start, long end, TResult payload, PartitionKey ac key = Tuple.Create(value.SyncTime, value.Payload); if (!this.startEventInformation.TryGetValue(key, out q)) { - q = new ElasticCircularBuffer(); + q = []; this.startEventInformation.Add(key, q); var x = new AdjustInfo(current); q.Enqueue(ref x); @@ -6140,7 +6140,7 @@ public override void OnNext(TPayload inputValue) this.partitionHighWatermarks.Add(value.PartitionKey, this.lowWatermark.rawValue); if (this.highWatermarkToPartitionsMap.TryGetValue(this.lowWatermark.rawValue, out HashSet keySet)) keySet.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, [value.PartitionKey]); } long moveTo = moveFrom; @@ -6161,7 +6161,7 @@ public override void OnNext(TPayload inputValue) else oldSet.Remove(value.PartitionKey); if (this.highWatermarkToPartitionsMap.TryGetValue(value.SyncTime, out HashSet set)) set.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(value.SyncTime, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(value.SyncTime, [value.PartitionKey]); moveTo = value.SyncTime - this.reorderLatency; if (moveTo < StreamEvent.MinSyncTime) moveTo = StreamEvent.MinSyncTime; @@ -6419,7 +6419,7 @@ protected override void UpdatePointers() if (this.highWatermarkToPartitionsMap.TryGetValue(kvp.Value, out HashSet set)) set.Add(kvp.Key); else - this.highWatermarkToPartitionsMap.Add(kvp.Value, new HashSet { kvp.Key }); + this.highWatermarkToPartitionsMap.Add(kvp.Value, [kvp.Key]); } } @@ -6540,7 +6540,7 @@ public override void OnNext(TPayload inputValue) this.partitionHighWatermarks.Add(value.PartitionKey, this.lowWatermark.rawValue); if (this.highWatermarkToPartitionsMap.TryGetValue(this.lowWatermark.rawValue, out HashSet keySet)) keySet.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, [value.PartitionKey]); } long moveTo = moveFrom; @@ -6561,7 +6561,7 @@ public override void OnNext(TPayload inputValue) else oldSet.Remove(value.PartitionKey); if (this.highWatermarkToPartitionsMap.TryGetValue(value.SyncTime, out HashSet set)) set.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(value.SyncTime, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(value.SyncTime, [value.PartitionKey]); moveTo = value.SyncTime - this.reorderLatency; if (moveTo < StreamEvent.MinSyncTime) moveTo = StreamEvent.MinSyncTime; @@ -6814,7 +6814,7 @@ protected override void UpdatePointers() if (this.highWatermarkToPartitionsMap.TryGetValue(kvp.Value, out HashSet set)) set.Add(kvp.Key); else - this.highWatermarkToPartitionsMap.Add(kvp.Value, new HashSet { kvp.Key }); + this.highWatermarkToPartitionsMap.Add(kvp.Value, [kvp.Key]); } } @@ -6937,7 +6937,7 @@ private void Action(long start, long end, TResult payload, PartitionKey ac this.partitionHighWatermarks.Add(value.PartitionKey, this.lowWatermark.rawValue); if (this.highWatermarkToPartitionsMap.TryGetValue(this.lowWatermark.rawValue, out HashSet keySet)) keySet.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(this.lowWatermark.rawValue, [value.PartitionKey]); } long moveTo = moveFrom; @@ -6958,7 +6958,7 @@ private void Action(long start, long end, TResult payload, PartitionKey ac else oldSet.Remove(value.PartitionKey); if (this.highWatermarkToPartitionsMap.TryGetValue(value.SyncTime, out HashSet set)) set.Add(value.PartitionKey); - else this.highWatermarkToPartitionsMap.Add(value.SyncTime, new HashSet { value.PartitionKey }); + else this.highWatermarkToPartitionsMap.Add(value.SyncTime, [value.PartitionKey]); moveTo = value.SyncTime - this.reorderLatency; if (moveTo < StreamEvent.MinSyncTime) moveTo = StreamEvent.MinSyncTime; @@ -7216,7 +7216,7 @@ protected override void UpdatePointers() if (this.highWatermarkToPartitionsMap.TryGetValue(kvp.Value, out HashSet set)) set.Add(kvp.Key); else - this.highWatermarkToPartitionsMap.Add(kvp.Value, new HashSet { kvp.Key }); + this.highWatermarkToPartitionsMap.Add(kvp.Value, [kvp.Key]); } } diff --git a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj index 967913da3..bdcd96f83 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj +++ b/Sources/Core/Microsoft.StreamProcessing/Microsoft.StreamProcessing.csproj @@ -10,6 +10,26 @@ Microsoft.StreamProcessing + + True + 1701;1702;0009 + + + + True + 1701;1702;0009 + + + + True + 1701;1702;0009 + + + + True + 1701;1702;0009 + + diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaDescriptor.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaDescriptor.cs index b701e11b1..ed815cf22 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaDescriptor.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaDescriptor.cs @@ -71,12 +71,12 @@ public Afa(TRegister defaultRegister = default, TAccumulator defaultAccumulator /// /// The set of final states in the AFA. /// - internal List finalStates = new List(); + internal List finalStates = []; /// /// The arcs present in the AFA. /// - internal Dictionary>> transitionInfo = new Dictionary>>(); + internal Dictionary>> transitionInfo = []; /// /// Start state of the AFA. @@ -180,7 +180,7 @@ internal void AddArc(int fromState, int toState, Arc arc) if (!this.transitionInfo.ContainsKey(fromState)) { - this.transitionInfo.Add(fromState, new Dictionary>()); + this.transitionInfo.Add(fromState, []); } if (!this.transitionInfo[fromState].ContainsKey(toState)) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaMultiEventListTransformer.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaMultiEventListTransformer.cs index 1d2030c91..4da11f940 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaMultiEventListTransformer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaMultiEventListTransformer.cs @@ -13,8 +13,8 @@ namespace Microsoft.StreamProcessing internal partial class AfaMultiEventListTemplate : AfaTemplate { private Func keyEqualityComparer; - protected readonly List>> edgeInfos = new List>>(); - protected readonly List>> startEdgeInfos = new List>>(); + protected readonly List>> edgeInfos = []; + protected readonly List>> startEdgeInfos = []; private bool payloadIsAnon; private bool payloadHasNoFields; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaTransformer.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaTransformer.cs index 36acd5d6a..b446e8efa 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaTransformer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaTransformer.cs @@ -17,8 +17,8 @@ internal partial class AfaTemplate protected Type accumulatorType; protected bool hasRegister; protected bool isSyncTimeSimultaneityFree; - protected readonly List>> currentlyActiveInfo = new List>>(); - protected readonly List>> newActivationInfo = new List>>(); + protected readonly List>> currentlyActiveInfo = []; + protected readonly List>> newActivationInfo = []; protected string TKey; protected string TPayload; protected string TRegister; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_EventList.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_EventList.cs index 27c6af00c..8266ff761 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_EventList.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_EventList.cs @@ -36,7 +36,7 @@ public CompiledUngroupedAfaPipe_EventList(Streamable stream, I this.activeStates = new FastLinkedList>(); this.activeStatesTraverser = new FastLinkedList>.ListTraverser(this.activeStates); - this.currentList = new List(); + this.currentList = []; this.lastSyncTime = -1; } @@ -320,7 +320,7 @@ public override unsafe void OnNext(StreamMessage batch) { ProcessCurrentTimestamp(); this.lastSyncTime = synctime; - this.currentList = new List(); + this.currentList = []; } this.currentList.Add(batch.payload.col[i]); diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_MultiEventList.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_MultiEventList.cs index 1cff60c47..3fe0cafc6 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_MultiEventList.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_MultiEventList.cs @@ -17,7 +17,7 @@ internal sealed class CompiledUngroupedAfaPipe_MultiEventList> activeStates; [DataMember] - private List currentTimestampEventList = new List(); + private List currentTimestampEventList = []; [DataMember] private long lastSyncTime; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/GroupedAfaMultiEventTransformer.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/GroupedAfaMultiEventTransformer.cs index d7c440689..cdd17bc54 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/GroupedAfaMultiEventTransformer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/GroupedAfaMultiEventTransformer.cs @@ -13,8 +13,8 @@ namespace Microsoft.StreamProcessing internal partial class GroupedAfaMultiEventTemplate : AfaTemplate { private Func keyEqualityComparer; - protected readonly List>> edgeInfos = new List>>(); - protected readonly List>> startEdgeInfos = new List>>(); + protected readonly List>> edgeInfos = []; + protected readonly List>> startEdgeInfos = []; private GroupedAfaMultiEventTemplate(string className, Type keyType, Type payloadType, Type registerType, Type accumulatorType) : base(className, keyType, payloadType, registerType, accumulatorType) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Clip/PartitionedClipJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Clip/PartitionedClipJoinPipe.cs index 8a551008a..fa32a8623 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Clip/PartitionedClipJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Clip/PartitionedClipJoinPipe.cs @@ -30,11 +30,11 @@ internal sealed class PartitionedClipJoinPipe> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage output; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/ClipByConstant/ClipByConstantPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/ClipByConstant/ClipByConstantPipe.cs index b602be6de..348921590 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/ClipByConstant/ClipByConstantPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/ClipByConstant/ClipByConstantPipe.cs @@ -24,7 +24,7 @@ internal sealed class ClipByConstantPipe : UnaryPipe output; [DataMember] - private SortedDictionary> syncTimeMap = new SortedDictionary>(); + private SortedDictionary> syncTimeMap = []; [Obsolete("Used only by serialization. Do not call directly.")] public ClipByConstantPipe() { } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/ClipByConstant/PartitionedClipByConstantPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/ClipByConstant/PartitionedClipByConstantPipe.cs index f7e4dce49..f42bdb0d4 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/ClipByConstant/PartitionedClipByConstantPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/ClipByConstant/PartitionedClipByConstantPipe.cs @@ -88,7 +88,7 @@ private void ReachTime(TPartitionKey pKey, long timestamp) private void AllocatePartition(TPartitionKey pKey, long timestamp) { this.syncTimeMapDictionary.Lookup(pKey, out int mapIndex); - this.syncTimeMapDictionary.Insert(ref mapIndex, pKey, new SortedDictionary>()); + this.syncTimeMapDictionary.Insert(ref mapIndex, pKey, []); this.lastSyncTimeDictionary.Lookup(pKey, out int timeIndex); this.lastSyncTimeDictionary.Insert(ref timeIndex, pKey, timestamp); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EndEdgeFreeOutput/EndEdgeFreeOutputPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EndEdgeFreeOutput/EndEdgeFreeOutputPipe.cs index d68c406b3..59d251ec8 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EndEdgeFreeOutput/EndEdgeFreeOutputPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EndEdgeFreeOutput/EndEdgeFreeOutputPipe.cs @@ -48,7 +48,7 @@ public EndEdgeFreeOutputPipe(EndEdgeFreeOutputStreamable stream, this.pool.Get(out this.output); this.output.Allocate(); - this.eventMap = new SortedDictionary>(); + this.eventMap = []; this.lastSyncTime = StreamEvent.MinSyncTime; this.lastCti = StreamEvent.MinSyncTime; } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EndEdgeFreeOutput/PartitionedEndEdgeFreeOutputPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EndEdgeFreeOutput/PartitionedEndEdgeFreeOutputPipe.cs index 345f2bd5a..c985d9012 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EndEdgeFreeOutput/PartitionedEndEdgeFreeOutputPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EndEdgeFreeOutput/PartitionedEndEdgeFreeOutputPipe.cs @@ -291,7 +291,7 @@ public override string ToString() private sealed class PartitionEntry { [DataMember] - public SortedDictionary> eventMap = new SortedDictionary>(); + public SortedDictionary> eventMap = []; [DataMember] public long lastSyncTime = StreamEvent.MinSyncTime; [DataMember] diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs index 901caebe8..9d40105b2 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs @@ -37,11 +37,11 @@ internal sealed class PartitionedEquiJoinPipe> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage output; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs index 29f18f0cb..e95ce8d97 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs @@ -36,11 +36,11 @@ internal sealed class PartitionedEquiJoinPipeCompound> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage, TGroupKey>, TResult> output; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeSimple.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeSimple.cs index 7d3237d9e..4fd79b8ec 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeSimple.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeSimple.cs @@ -35,11 +35,11 @@ internal sealed class PartitionedEquiJoinPipeSimple> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage, TResult> output; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipe.cs index 640b4a1cb..4780892e4 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipe.cs @@ -35,11 +35,11 @@ internal sealed class PartitionedFixedIntervalEquiJoinPipe> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage output; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs index 814ef34ce..aea84b0e1 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs @@ -34,11 +34,11 @@ internal sealed class PartitionedFixedIntervalEquiJoinPipeCompound> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage, TGroupKey>, TResult> output; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeSimple.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeSimple.cs index 0cfe92511..51ce422bc 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeSimple.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeSimple.cs @@ -33,11 +33,11 @@ internal sealed class PartitionedFixedIntervalEquiJoinPipeSimple> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage, TResult> output; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/IncreasingOrder/IncreasingOrderEquiJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/IncreasingOrder/IncreasingOrderEquiJoinPipe.cs index 026eccaa6..891fd0377 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/IncreasingOrder/IncreasingOrderEquiJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/IncreasingOrder/IncreasingOrderEquiJoinPipe.cs @@ -62,8 +62,8 @@ public IncreasingOrderEquiJoinPipe( this.joinKeyOrderComparerExpression = stream.Left.Properties.KeyComparer.GetCompareExpr(); this.joinKeyOrderComparer = this.joinKeyOrderComparerExpression.Compile(); - this.currentLeftList = new List>(); - this.currentRightList = new List>(); + this.currentLeftList = []; + this.currentRightList = []; this.errorMessages = stream.ErrorMessages; this.pool = MemoryManager.GetMemoryPool(stream.Properties.IsColumnar); diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/StartEdge/PartitionedStartEdgeEquiJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/StartEdge/PartitionedStartEdgeEquiJoinPipe.cs index f9371bb6d..7acba599f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/StartEdge/PartitionedStartEdgeEquiJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/StartEdge/PartitionedStartEdgeEquiJoinPipe.cs @@ -32,11 +32,11 @@ internal sealed class PartitionedStartEdgeEquiJoinPipe> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage output; @@ -99,8 +99,8 @@ protected override void ProduceBinaryQueryPlan(PlanNode left, PlanNode right) private void NewPartition(TPartitionKey pKey) { - this.leftQueue.Insert(pKey, new PooledElasticCircularBuffer()); - this.rightQueue.Insert(pKey, new PooledElasticCircularBuffer()); + this.leftQueue.Insert(pKey, []); + this.rightQueue.Insert(pKey, []); if (!this.partitionData.Lookup(pKey, out int index)) this.partitionData.Insert(ref index, pKey, new PartitionEntry { key = pKey }); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/ExtendLifetime/ExtendLifetimeNegativePipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/ExtendLifetime/ExtendLifetimeNegativePipe.cs index b03a53aeb..2ed7c29a0 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/ExtendLifetime/ExtendLifetimeNegativePipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/ExtendLifetime/ExtendLifetimeNegativePipe.cs @@ -29,7 +29,7 @@ internal sealed class ExtendLifetimeNegativePipe : UnaryPipe> contractedToZero = new Dictionary>(); + private Dictionary> contractedToZero = []; [SchemaSerialization] private readonly Expression> keyComparerExpr; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/ExtendLifetime/PartitionedExtendLifetimeNegativePipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/ExtendLifetime/PartitionedExtendLifetimeNegativePipe.cs index 1eb007e64..2af657d69 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/ExtendLifetime/PartitionedExtendLifetimeNegativePipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/ExtendLifetime/PartitionedExtendLifetimeNegativePipe.cs @@ -118,7 +118,7 @@ private void AllocatePartition(TPartitionKey pKey, long timestamp) this.lastSyncTimeDictionary.Lookup(pKey, out int timeIndex); this.lastSyncTimeDictionary.Insert(ref timeIndex, pKey, timestamp); this.contractedToZeroDictionary.Lookup(pKey, out int collapseIndex); - this.contractedToZeroDictionary.Insert(ref collapseIndex, pKey, new Dictionary>()); + this.contractedToZeroDictionary.Insert(ref collapseIndex, pKey, []); } public override unsafe void OnNext(StreamMessage batch) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/LeftAntiSemiJoin/PartitionedLeftAntiSemiJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/LeftAntiSemiJoin/PartitionedLeftAntiSemiJoinPipe.cs index ee6025c5d..31749d3ea 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/LeftAntiSemiJoin/PartitionedLeftAntiSemiJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/LeftAntiSemiJoin/PartitionedLeftAntiSemiJoinPipe.cs @@ -35,11 +35,11 @@ internal sealed class PartitionedLeftAntiSemiJoinPipe> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage output; @@ -92,8 +92,8 @@ protected override void ProduceBinaryQueryPlan(PlanNode left, PlanNode right) private void NewPartition(TPartitionKey pKey) { - this.leftQueue.Insert(pKey, new PooledElasticCircularBuffer()); - this.rightQueue.Insert(pKey, new PooledElasticCircularBuffer()); + this.leftQueue.Insert(pKey, []); + this.rightQueue.Insert(pKey, []); if (!this.partitionData.Lookup(pKey, out int index)) this.partitionData.Insert(ref index, pKey, new PartitionEntry(this)); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Multicast/DependentStreamable.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Multicast/DependentStreamable.cs index 5af88e3f5..e51095d8a 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Multicast/DependentStreamable.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Multicast/DependentStreamable.cs @@ -39,7 +39,7 @@ private IStreamable[] GenerateStreamableArray() throw new InvalidOperationException("Cannot generate a streamable array more than once."); } - this.toSubscribe = new HashSet(); + this.toSubscribe = []; var output = new IStreamable[this.outputCount]; for (int i = 0; i < this.outputCount; i++) @@ -105,7 +105,7 @@ private sealed class DisposableManager public DisposableManager(int count) { - this.toDispose = new HashSet(); + this.toDispose = []; for (int i = 0; i < count; i++) { this.toDispose.Add(i); diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/PartitionedSessionWindowPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/PartitionedSessionWindowPipe.cs index 1fdf85f03..24b5542a1 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/PartitionedSessionWindowPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/PartitionedSessionWindowPipe.cs @@ -26,7 +26,7 @@ internal sealed class PartitionedSessionWindowPipe output; - private Dictionary> orderedKeysDictionary = new Dictionary>(); + private Dictionary> orderedKeysDictionary = []; [DataMember] private FastDictionary2 windowEndTimeDictionary = new FastDictionary2(); [DataMember] diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Shuffle/ShufflePipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Shuffle/ShufflePipe.cs index f96d0328c..f94fe13aa 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Shuffle/ShufflePipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Shuffle/ShufflePipe.cs @@ -56,7 +56,7 @@ public PartitionedShuffleNestedPipe( this.errorMessages = stream.ErrorMessages; this.l1Pool = MemoryManager.GetMemoryPool, TSource>(stream.Properties.IsColumnar); - this.Observers = new List, TSource>>(); + this.Observers = []; this.batches = new StreamMessage, TSource>[totalBranchesL2]; for (int i = 0; i < totalBranchesL2; i++) @@ -363,7 +363,7 @@ public ShuffleNestedPipe( this.errorMessages = stream.ErrorMessages; this.l1Pool = MemoryManager.GetMemoryPool, TSource>(stream.Properties.IsColumnar); - this.Observers = new List, TSource>>(); + this.Observers = []; this.batches = new StreamMessage, TSource>[totalBranchesL2]; for (int i = 0; i < totalBranchesL2; i++) @@ -652,7 +652,7 @@ public ShufflePipe( this.errorMessages = stream.ErrorMessages; this.l1Pool = MemoryManager.GetMemoryPool(stream.Properties.IsColumnar); - this.Observers = new List>(); + this.Observers = []; this.batches = new StreamMessage[totalBranchesL2]; for (int i = 0; i < totalBranchesL2; i++) @@ -926,7 +926,7 @@ public ShuffleSameKeyPipe( this.errorMessages = stream.ErrorMessages; this.l1Pool = MemoryManager.GetMemoryPool(stream.Properties.IsColumnar); - this.Observers = new List>(); + this.Observers = []; this.batches = new StreamMessage[totalBranchesL2]; for (int i = 0; i < totalBranchesL2; i++) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Shufflecast/ShufflecastPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Shufflecast/ShufflecastPipe.cs index 5ed3ef894..8c345448e 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Shufflecast/ShufflecastPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Shufflecast/ShufflecastPipe.cs @@ -47,7 +47,7 @@ public ShufflecastPipe( this.l1Pool = MemoryManager.GetMemoryPool(stream.Properties.IsColumnar); this.l1Pool.GetBV(out this.resetBV); for (int i = 0; i < this.resetBV.col.Length; i++) this.resetBV.col[i] = ~0; - this.Observers = new List>(); + this.Observers = []; } public void AddObserver(IStreamObserver observer) => this.Observers.Add(observer); diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/AggregateTempateClasses.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/AggregateTempateClasses.cs index 1bbf7a97a..a81cb1dd0 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/AggregateTempateClasses.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/AggregateTempateClasses.cs @@ -88,7 +88,7 @@ public static Tuple Generate(Snapsh template.outputFields = new ColumnarRepresentation(outputType).AllFields; - assemblyReferences = new List(); + assemblyReferences = []; #region Key Comparer IEqualityComparerExpression keyComparer; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Hopping/PartitionedSnapshotWindowHoppingPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Hopping/PartitionedSnapshotWindowHoppingPipe.cs index 7f8bd7ab9..f5b7b3d24 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Hopping/PartitionedSnapshotWindowHoppingPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Hopping/PartitionedSnapshotWindowHoppingPipe.cs @@ -466,7 +466,7 @@ private sealed class PartitionEntry [DataMember] public CircularBuffer ecq; [DataMember] - public HashSet heldAggregates = new HashSet(); + public HashSet heldAggregates = []; [DataMember] public long lastSyncTime = long.MinValue; } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Hopping/SnapshotWindowHoppingPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Hopping/SnapshotWindowHoppingPipe.cs index 057c502ce..831a07490 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Hopping/SnapshotWindowHoppingPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Hopping/SnapshotWindowHoppingPipe.cs @@ -54,7 +54,7 @@ internal sealed class SnapshotWindowHoppingPipe : [DataMember] private FastDictionary2> aggregateByKey; [DataMember] - private HashSet heldAggregates = new HashSet(); + private HashSet heldAggregates = []; [DataMember] private CircularBuffer ecq; [DataMember] diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/PartitionedSnapshotWindowPriorityQueuePipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/PartitionedSnapshotWindowPriorityQueuePipe.cs index cca149633..d81d75a74 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/PartitionedSnapshotWindowPriorityQueuePipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/PartitionedSnapshotWindowPriorityQueuePipe.cs @@ -434,9 +434,9 @@ protected override void DisposeState() private sealed class PartitionEntry { [DataMember] - public HashSet heldAggregates = new HashSet(); + public HashSet heldAggregates = []; [DataMember] - public SortedDictionary>> ecq = new SortedDictionary>>(); + public SortedDictionary>> ecq = []; [DataMember] public long lastSyncTime = long.MinValue; } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/PartitionedSnapshotWindowPriorityQueuePipeSimple.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/PartitionedSnapshotWindowPriorityQueuePipeSimple.cs index bd51b2b16..45e2cc3d4 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/PartitionedSnapshotWindowPriorityQueuePipeSimple.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/PartitionedSnapshotWindowPriorityQueuePipeSimple.cs @@ -360,7 +360,7 @@ protected override void DisposeState() private sealed class PartitionEntry { [DataMember] - public SortedDictionary> ecq = new SortedDictionary>(); + public SortedDictionary> ecq = []; [DataMember] public long lastSyncTime = long.MinValue; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/SnapshotWindowPriorityQueuePipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/SnapshotWindowPriorityQueuePipe.cs index 31de19c5c..718340c07 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/SnapshotWindowPriorityQueuePipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/SnapshotWindowPriorityQueuePipe.cs @@ -54,9 +54,9 @@ internal sealed class SnapshotWindowPriorityQueuePipe> aggregateByKey; [DataMember] - private HashSet heldAggregates = new HashSet(); + private HashSet heldAggregates = []; [DataMember] - private SortedDictionary>> ecq = new SortedDictionary>>(); + private SortedDictionary>> ecq = []; [DataMember] private long lastSyncTime = long.MinValue; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/SnapshotWindowPriorityQueuePipeSimple.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/SnapshotWindowPriorityQueuePipeSimple.cs index cf82f67aa..9d8d7d82e 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/SnapshotWindowPriorityQueuePipeSimple.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/PriorityQueue/SnapshotWindowPriorityQueuePipeSimple.cs @@ -44,7 +44,7 @@ internal sealed class SnapshotWindowPriorityQueuePipeSimple batch; [DataMember] - private SortedDictionary> ecq = new SortedDictionary>(); + private SortedDictionary> ecq = []; [DataMember] private long lastSyncTime = long.MinValue; [DataMember] diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/PartitionedSnapshotWindowSlidingPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/PartitionedSnapshotWindowSlidingPipe.cs index 145da4400..4d090665a 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/PartitionedSnapshotWindowSlidingPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/PartitionedSnapshotWindowSlidingPipe.cs @@ -462,9 +462,9 @@ private sealed class EcqState private sealed class PartitionEntry { [DataMember] - public ElasticCircularBuffer ecq = new ElasticCircularBuffer(); + public ElasticCircularBuffer ecq = []; [DataMember] - public HashSet heldAggregates = new HashSet(); + public HashSet heldAggregates = []; [DataMember] public long lastSyncTime = long.MinValue; } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/PartitionedSnapshotWindowSlidingPipeSimple.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/PartitionedSnapshotWindowSlidingPipeSimple.cs index 2af3ccb17..466f21932 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/PartitionedSnapshotWindowSlidingPipeSimple.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/PartitionedSnapshotWindowSlidingPipeSimple.cs @@ -361,7 +361,7 @@ protected override void DisposeState() private sealed class PartitionEntry { [DataMember] - public ElasticCircularBuffer> ecq = new ElasticCircularBuffer>(); + public ElasticCircularBuffer> ecq = []; [DataMember] public long lastSyncTime = long.MinValue; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/SnapshotWindowSlidingPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/SnapshotWindowSlidingPipe.cs index 39b912ca1..ba7d465de 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/SnapshotWindowSlidingPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/SnapshotWindowSlidingPipe.cs @@ -54,7 +54,7 @@ internal sealed class SnapshotWindowSlidingPipe : [DataMember] private FastDictionary2> aggregateByKey; [DataMember] - private HashSet heldAggregates = new HashSet(); + private HashSet heldAggregates = []; [DataMember] private ElasticCircularBuffer ecq; [DataMember] @@ -92,7 +92,7 @@ public SnapshotWindowSlidingPipe( this.batch.Allocate(); this.aggregateByKey = comparer.CreateFastDictionary2Generator>(1, this.keyComparerEquals, this.keyComparerGetHashCode, stream.Properties.QueryContainer).Invoke(); - this.ecq = new ElasticCircularBuffer(); + this.ecq = []; var stateDictGenerator = comparer.CreateFastDictionaryGenerator>(1, this.keyComparerEquals, this.keyComparerGetHashCode, stream.Properties.QueryContainer); this.ecqEntryPool = new DataStructurePool>>(() => stateDictGenerator.Invoke()); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/SnapshotWindowSlidingPipeSimple.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/SnapshotWindowSlidingPipeSimple.cs index 36fd57556..51fd825bb 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/SnapshotWindowSlidingPipeSimple.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/Sliding/SnapshotWindowSlidingPipeSimple.cs @@ -78,7 +78,7 @@ public SnapshotWindowSlidingPipeSimple( this.pool.Get(out this.batch); this.batch.Allocate(); - this.ecq = new ElasticCircularBuffer>(); + this.ecq = []; } public override void ProduceQueryPlan(PlanNode previous) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/StartEdge/PartitionedSnapshotWindowStartEdgePipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/StartEdge/PartitionedSnapshotWindowStartEdgePipe.cs index 1f4923159..1ed314e9d 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/StartEdge/PartitionedSnapshotWindowStartEdgePipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/StartEdge/PartitionedSnapshotWindowStartEdgePipe.cs @@ -294,7 +294,7 @@ protected override void DisposeState() private sealed class PartitionEntry { [DataMember] - public HashSet heldAggregates = new HashSet(); + public HashSet heldAggregates = []; [DataMember] public long lastSyncTime = long.MinValue; } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/StartEdge/SnapshotWindowStartEdgePipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/StartEdge/SnapshotWindowStartEdgePipe.cs index 3da156a68..82d952425 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/StartEdge/SnapshotWindowStartEdgePipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/StartEdge/SnapshotWindowStartEdgePipe.cs @@ -46,7 +46,7 @@ internal sealed class SnapshotWindowStartEdgePipe [DataMember] private FastDictionary2> aggregateByKey; [DataMember] - private HashSet heldAggregates = new HashSet(); + private HashSet heldAggregates = []; [DataMember] private long lastSyncTime = long.MinValue; diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SprayGroupImport/SprayGroupImportPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SprayGroupImport/SprayGroupImportPipe.cs index 174dbb335..8fc2baff0 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SprayGroupImport/SprayGroupImportPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SprayGroupImport/SprayGroupImportPipe.cs @@ -47,7 +47,7 @@ public SynchronousGAPipe( this.l1_spray = 0; - this.Observers = new List>(); + this.Observers = []; this.pool = MemoryManager.GetMemoryPool(stream.Properties.IsColumnar); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/PartitionedStitchPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/PartitionedStitchPipe.cs index ad7b83ae9..9b0f87d5c 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/PartitionedStitchPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/PartitionedStitchPipe.cs @@ -105,7 +105,7 @@ private static void InsertOrAppend(FastDictionary2> events, K k } else { - lst = new List(); + lst = []; events.Insert(key, lst); lst.Add(value); } @@ -225,7 +225,7 @@ public override unsafe void OnNext(StreamMessage input) if ((src_bv[i >> 6] & (1L << (i & 0x3f))) == 0 || *vother < 0) { var partitionKey = this.getPartitionKey(input.key.col[i]); - if (!this.ClosedEvents.Lookup(partitionKey, out this.ClosedEventsIndex)) this.ClosedEvents.Insert(ref this.ClosedEventsIndex, partitionKey, new SortedDictionary>>()); + if (!this.ClosedEvents.Lookup(partitionKey, out this.ClosedEventsIndex)) this.ClosedEvents.Insert(ref this.ClosedEventsIndex, partitionKey, []); if (!this.OpenEvents.Lookup(partitionKey, out this.OpenEventsIndex)) this.OpenEvents.Insert(ref this.OpenEventsIndex, partitionKey, this.OpenEventsGenerator()); if (!this.now.Lookup(partitionKey, out this.nowIndex)) this.now.Insert(ref this.nowIndex, partitionKey, StreamEvent.MinSyncTime); if (!this.CurrentTimeOpenEventBufferTime.Lookup(partitionKey, out this.CurrentTimeOpenEventBufferTimeIndex)) this.CurrentTimeOpenEventBufferTime.Insert(ref this.CurrentTimeOpenEventBufferTimeIndex, partitionKey, StreamEvent.MinSyncTime); diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/StitchPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/StitchPipe.cs index c2c867553..ddcc81adf 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/StitchPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/StitchPipe.cs @@ -45,7 +45,7 @@ internal sealed class StitchPipe : UnaryPipe>> ClosedEvents = - new SortedDictionary>>(); + []; [Obsolete("Used only by serialization. Do not call directly.")] public StitchPipe() { } @@ -81,7 +81,7 @@ private static void InsertOrAppend(FastDictionary2> events, K k } else { - lst = new List(); + lst = []; events.Insert(key, lst); lst.Add(value); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Union/PartitionedUnionPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Union/PartitionedUnionPipe.cs index d6e6e6ac5..6e4df5c5b 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Union/PartitionedUnionPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Union/PartitionedUnionPipe.cs @@ -22,11 +22,11 @@ internal sealed class PartitionedUnionPipe : Bina [DataMember] private FastDictionary2> rightQueue = new FastDictionary2>(); [DataMember] - private HashSet processQueue = new HashSet(); + private HashSet processQueue = []; [DataMember] - private HashSet seenKeys = new HashSet(); + private HashSet seenKeys = []; [DataMember] - private HashSet cleanKeys = new HashSet(); + private HashSet cleanKeys = []; [DataMember] private StreamMessage output; @@ -56,8 +56,8 @@ public PartitionedUnionPipe(IStreamable stream, IStreamObserver< private void NewPartition(TPartitionKey pKey) { - this.leftQueue.Insert(pKey, new PooledElasticCircularBuffer()); - this.rightQueue.Insert(pKey, new PooledElasticCircularBuffer()); + this.leftQueue.Insert(pKey, []); + this.rightQueue.Insert(pKey, []); if (!this.nextLeftTime.Lookup(pKey, out int left)) this.nextLeftTime.Insert(ref left, pKey, StreamEvent.MinSyncTime); if (!this.nextRightTime.Lookup(pKey, out int right)) this.nextRightTime.Insert(ref right, pKey, StreamEvent.MinSyncTime); diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Where/MultiStringTransforms.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Where/MultiStringTransforms.cs index 671081067..17f33e899 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Where/MultiStringTransforms.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Where/MultiStringTransforms.cs @@ -33,7 +33,7 @@ public static MultiStringTransformationResult Transform(Type t, Expression e) return new MultiStringTransformationResult { vectorOperation = string.Join("\n", vectorStatements), - wrapperTable = new Dictionary(), + wrapperTable = [], }; } var wrapperVisitor = new WrapperTransformer(t); @@ -149,7 +149,7 @@ public static bool IsStaticRegexMatch(MethodCallExpression methodCall, Type batc private sealed class Vectorize : ExpressionVisitor { private static int counter = 0; - public List vectorStatements = new List(); + public List vectorStatements = []; private string incomingBV = "batch.bitvector"; private bool inPlace = false; private string resultBV; @@ -346,7 +346,7 @@ private static bool MultiStringHasVectorImplementation(string methodName) private class WrapperTransformer : ExpressionVisitor { private readonly Type batchType; - public Dictionary multiStringTable = new Dictionary(); + public Dictionary multiStringTable = []; public WrapperTransformer(Type t) => this.batchType = t; diff --git a/Sources/Core/Microsoft.StreamProcessing/Pipes/BinaryPlanNode.cs b/Sources/Core/Microsoft.StreamProcessing/Pipes/BinaryPlanNode.cs index 8b3683a8b..a778332ef 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Pipes/BinaryPlanNode.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Pipes/BinaryPlanNode.cs @@ -140,7 +140,7 @@ internal JoinPlanNode( /// /// Returns the set of expressions employed by the current node to compute the join. /// - public Dictionary JoinExpressions { get; } = new Dictionary(); + public Dictionary JoinExpressions { get; } = []; } /// diff --git a/Sources/Core/Microsoft.StreamProcessing/QueryContainer.cs b/Sources/Core/Microsoft.StreamProcessing/QueryContainer.cs index 4eb1d6c72..bdd3436d0 100644 --- a/Sources/Core/Microsoft.StreamProcessing/QueryContainer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/QueryContainer.cs @@ -9,6 +9,7 @@ using System.IO; using System.Linq; using System.Reflection; +using System.Threading; using Microsoft.StreamProcessing.Serializer; namespace Microsoft.StreamProcessing @@ -18,7 +19,7 @@ namespace Microsoft.StreamProcessing /// public sealed class QueryContainer { - private readonly object sentinel = new object(); + private readonly Lock sentinel = new(); /// /// ISurrogate to be used in serialization in checkpoints and serialized StreamMessage @@ -26,11 +27,11 @@ public sealed class QueryContainer /// public ISurrogate Surrogate { get; } - private readonly HashSet ingressSites = new HashSet(); - private readonly HashSet egressSites = new HashSet(); + private readonly HashSet ingressSites = []; + private readonly HashSet egressSites = []; - private readonly Dictionary ingressPipes = new Dictionary(); - private readonly Dictionary egressPipes = new Dictionary(); + private readonly Dictionary ingressPipes = []; + private readonly Dictionary egressPipes = []; private readonly ConcurrentDictionary, Type> sortedDictionaryTypes = new ConcurrentDictionary, Type>(); private readonly ConcurrentDictionary, Type> fastDictionaryTypes = new ConcurrentDictionary, Type>(); @@ -102,7 +103,7 @@ internal object GetOrCreateSerializer(Type type) { if (this.serializers.TryGetValue(type, out object serializer)) return serializer; var serializerStatic = typeof(StreamSerializer); - var method = serializerStatic.GetTypeInfo().GetMethod("Create", new Type[] { typeof(SerializerSettings) }).MakeGenericMethod(type); + var method = serializerStatic.GetTypeInfo().GetMethod("Create", [typeof(SerializerSettings)]).MakeGenericMethod(type); var settings = new SerializerSettings() { KnownTypes = this.CollectedGeneratedTypes, @@ -124,21 +125,19 @@ internal IEnumerable CollectedGeneratedTypes /// A Process object that represents an active, running query that can be checkpointed. public Process Restore(Stream inputStream = null) { - lock (this.sentinel) - { - // Restoration should not happen until after all streams have been both registered and subscribed - if (this.ingressSites.Count != this.ingressPipes.Count) throw new StreamProcessingException("Not all input data sources have been subscribed to."); - if (this.egressSites.Count != this.egressPipes.Count) throw new StreamProcessingException("Not all output data sources have been subscribed to."); + using var _ = sentinel.EnterScope(); + // Restoration should not happen until after all streams have been both registered and subscribed + if (this.ingressSites.Count != this.ingressPipes.Count) throw new StreamProcessingException("Not all input data sources have been subscribed to."); + if (this.egressSites.Count != this.egressPipes.Count) throw new StreamProcessingException("Not all output data sources have been subscribed to."); - var process = new Process(this.ingressPipes.Clone(), this.egressPipes.Clone()); + var process = new Process(this.ingressPipes.Clone(), this.egressPipes.Clone()); - process.Restore(inputStream); + process.Restore(inputStream); - this.ingressPipes.Clear(); - this.egressPipes.Clear(); + this.ingressPipes.Clear(); + this.egressPipes.Clear(); - return process; - } + return process; } } @@ -151,7 +150,7 @@ public sealed class Process private const int CheckpointVersionMinor = 0; private const int CheckpointVersionRevision = 0; - private readonly object sentinel = new object(); + private readonly Lock sentinel = new(); private readonly Dictionary IngressPipes; private Dictionary queryPlans; @@ -171,75 +170,79 @@ internal Process(Dictionary ingress, Dictionary< public void Checkpoint(Stream outputStream) { Invariant.IsNotNull(outputStream, nameof(outputStream)); - lock (this.sentinel) + using var _ = this.sentinel.EnterScope(); + Span buffer = stackalloc byte[sizeof(int) * 3]; + BitConverter.TryWriteBytes(buffer, CheckpointVersionMajor); + BitConverter.TryWriteBytes(buffer[sizeof(int)..], CheckpointVersionMinor); + BitConverter.TryWriteBytes(buffer[(2 * sizeof(int))..], CheckpointVersionRevision); + outputStream.Write(buffer); + + try { - outputStream.Write(BitConverter.GetBytes(CheckpointVersionMajor), 0, sizeof(int)); - outputStream.Write(BitConverter.GetBytes(CheckpointVersionMinor), 0, sizeof(int)); - outputStream.Write(BitConverter.GetBytes(CheckpointVersionRevision), 0, sizeof(int)); - - try + foreach (var pipe in this.IngressPipes.Values) { - foreach (var pipe in this.IngressPipes.Values) - { - pipe.Checkpoint(outputStream); - } + pipe.Checkpoint(outputStream); } - catch (Exception) + } + catch (Exception) + { + foreach (var pipe in this.IngressPipes.Values) { - foreach (var pipe in this.IngressPipes.Values) - { - pipe.Reset(); - } - throw; + pipe.Reset(); } + throw; } } internal void Restore(Stream inputStream) { - lock (this.sentinel) + using var _ = this.sentinel.EnterScope(); + if (inputStream != null) { - if (inputStream != null) + Span buffer = stackalloc byte[sizeof(int) * 3]; + try { - byte[] buffer = new byte[sizeof(int)]; - inputStream.Read(buffer, 0, sizeof(int)); - int major = BitConverter.ToInt32(buffer, 0); - inputStream.Read(buffer, 0, sizeof(int)); - int minor = BitConverter.ToInt32(buffer, 0); - inputStream.Read(buffer, 0, sizeof(int)); - int revision = BitConverter.ToInt32(buffer, 0); - - if (major != CheckpointVersionMajor || minor != CheckpointVersionMinor || revision != CheckpointVersionRevision) - { - throw new StreamProcessingException( - string.Format( - CultureInfo.InvariantCulture, - "Version mismatch between the stream state and the engine. Expected: {0}.{1}.{2}, Found: {3}.{4}.{5}", - CheckpointVersionMajor, - CheckpointVersionMinor, - CheckpointVersionRevision, - major, - minor, - revision)); - } + inputStream.ReadExactly(buffer); + } + catch (EndOfStreamException e) + { + throw new StreamProcessingException("Failed to read checkpoint version information from the stream.", e); } - try + int major = BitConverter.ToInt32(buffer); + int minor = BitConverter.ToInt32(buffer[sizeof(int)..]); + int revision = BitConverter.ToInt32(buffer[(2 * sizeof(int))..]); + + if (major != CheckpointVersionMajor || minor != CheckpointVersionMinor || revision != CheckpointVersionRevision) { - foreach (var pipe in this.IngressPipes.Values) - { - pipe.Restore(inputStream); - } + throw new StreamProcessingException( + string.Format( + CultureInfo.InvariantCulture, + "Version mismatch between the stream state and the engine. Expected: {0}.{1}.{2}, Found: {3}.{4}.{5}", + CheckpointVersionMajor, + CheckpointVersionMinor, + CheckpointVersionRevision, + major, + minor, + revision)); } - catch (Exception) + } + + try + { + foreach (var pipe in this.IngressPipes.Values) { - foreach (var pipe in this.IngressPipes.Values) - { - pipe.Reset(); - } - throw; + pipe.Restore(inputStream); } } + catch (Exception) + { + foreach (var pipe in this.IngressPipes.Values) + { + pipe.Reset(); + } + throw; + } } /// @@ -247,23 +250,21 @@ internal void Restore(Stream inputStream) /// public void Flush() { - lock (this.sentinel) + using var _ = this.sentinel.EnterScope(); + try { - try + foreach (var pipe in this.IngressPipes.Values) { - foreach (var pipe in this.IngressPipes.Values) - { - pipe.OnFlush(); - } + pipe.OnFlush(); } - catch (Exception) + } + catch (Exception) + { + foreach (var pipe in this.IngressPipes.Values) { - foreach (var pipe in this.IngressPipes.Values) - { - pipe.Reset(); - } - throw; + pipe.Reset(); } + throw; } } @@ -298,7 +299,7 @@ public Dictionary QueryPlan { if (this.queryPlans == null) { - this.queryPlans = new Dictionary(); + this.queryPlans = []; foreach (var i in this.IngressPipes) { i.Value.ProduceQueryPlan(null); diff --git a/Sources/Core/Microsoft.StreamProcessing/Serializer/GeneratedSubtypes/FastDictionaryGenerator.cs b/Sources/Core/Microsoft.StreamProcessing/Serializer/GeneratedSubtypes/FastDictionaryGenerator.cs index 4393bacc6..615acd948 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Serializer/GeneratedSubtypes/FastDictionaryGenerator.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Serializer/GeneratedSubtypes/FastDictionaryGenerator.cs @@ -15,7 +15,7 @@ internal static class FastDictionaryGenerator private const string Prefix = "GeneratedFastDictionary_"; private static readonly object sentinel = new object(); private static int classCounter = 0; - private static readonly Dictionary, Type> generatorCache = new Dictionary, Type>(); + private static readonly Dictionary, Type> generatorCache = []; public static Func> CreateFastDictionaryGenerator( this IEqualityComparerExpression comparerExp, int capacity, Func equalsFunc, Func getHashCodeFunc, QueryContainer container) @@ -61,7 +61,7 @@ internal static class FastDictionaryGenerator2 private const string Prefix = "GeneratedFastDictionary2_"; private static readonly object sentinel = new object(); private static int classCounter = 0; - private static readonly Dictionary, Type> generatorCache = new Dictionary, Type>(); + private static readonly Dictionary, Type> generatorCache = []; public static Func> CreateFastDictionary2Generator( this IEqualityComparerExpression comparerExp, int capacity, Func equalsFunc, Func getHashCodeFunc, QueryContainer container) @@ -107,7 +107,7 @@ internal static class FastDictionaryGenerator3 private const string Prefix = "GeneratedFastDictionary3_"; private static readonly object sentinel = new object(); private static int classCounter = 0; - private static readonly Dictionary, Type> generatorCache = new Dictionary, Type>(); + private static readonly Dictionary, Type> generatorCache = []; public static Func> CreateFastDictionary3Generator( this IEqualityComparerExpression comparerExp, int capacity, Func equalsFunc, Func getHashCodeFunc, QueryContainer container) diff --git a/Sources/Core/Microsoft.StreamProcessing/Serializer/GeneratedSubtypes/SortedDictionaryGenerator.cs b/Sources/Core/Microsoft.StreamProcessing/Serializer/GeneratedSubtypes/SortedDictionaryGenerator.cs index 4ff794c7b..7dce2367b 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Serializer/GeneratedSubtypes/SortedDictionaryGenerator.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Serializer/GeneratedSubtypes/SortedDictionaryGenerator.cs @@ -15,7 +15,7 @@ internal static class SortedDictionaryGenerator { private const string Prefix = "GeneratedSortedDictionary"; private static readonly object sentinel = new object(); - private static readonly Dictionary, Type> DictionaryTypes = new Dictionary, Type>(); + private static readonly Dictionary, Type> DictionaryTypes = []; public static Expression>> CreateSortedDictionaryGenerator(this IComparerExpression comparerExp, QueryContainer container) { diff --git a/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/ClassSerializer.cs b/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/ClassSerializer.cs index 57f253942..ef923bcad 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/ClassSerializer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/ClassSerializer.cs @@ -14,7 +14,7 @@ namespace Microsoft.StreamProcessing.Serializer.Serializers { internal abstract class ClassSerializer : ObjectSerializerBase { - protected readonly List fields = new List(); + protected readonly List fields = []; protected ClassSerializer(Type runtimeType) : base(runtimeType) { } diff --git a/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/MultidimensionalArraySerializer.cs b/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/MultidimensionalArraySerializer.cs index 636b69382..642baf38e 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/MultidimensionalArraySerializer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/MultidimensionalArraySerializer.cs @@ -19,7 +19,7 @@ internal sealed class MultidimensionalArraySerializer : ObjectSerializerBase protected override Expression BuildSerializerSafe(Expression encoder, Expression value) { int rank = this.RuntimeType.GetArrayRank(); - return BuildSerializerImpl(new List(), encoder, value, 0, rank); + return BuildSerializerImpl([], encoder, value, 0, rank); } private Expression BuildSerializerImpl( @@ -78,7 +78,7 @@ protected override Expression BuildDeserializerSafe(Expression decoder) var result = Expression.Variable(type, "result"); body.Add(Expression.Assign(result, Expression.NewArrayBounds(type.GetElementType(), lengths))); - body.Add(GenerateCopy(new List(), result, deserialized, 0, type.GetArrayRank())); + body.Add(GenerateCopy([], result, deserialized, 0, type.GetArrayRank())); body.Add(result); return Expression.Block(new[] { deserialized, result }, body); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/ReflectionSchemaBuilder.cs b/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/ReflectionSchemaBuilder.cs index 5802f698f..f8c339139 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/ReflectionSchemaBuilder.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Serializer/Serializers/ReflectionSchemaBuilder.cs @@ -19,7 +19,7 @@ internal sealed class ReflectionSchemaBuilder private readonly SerializerSettings settings; private readonly HashSet knownTypes; - private readonly Dictionary seenTypes = new Dictionary(); + private readonly Dictionary seenTypes = []; static ReflectionSchemaBuilder() { diff --git a/Sources/Core/Microsoft.StreamProcessing/Sharding/ShardedStreamCache.cs b/Sources/Core/Microsoft.StreamProcessing/Sharding/ShardedStreamCache.cs index 585cd9b91..02022aead 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Sharding/ShardedStreamCache.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Sharding/ShardedStreamCache.cs @@ -76,7 +76,7 @@ public ShardedCacheObserver(StreamCache cache, StreamProperties< this.cache = cache; this.sourceProps = sourceProps; - this.elements = new List>>(); + this.elements = []; } public void Dispose() diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamProperties.cs b/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamProperties.cs index 2d077f0fa..0b2e8c7c1 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamProperties.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamProperties.cs @@ -49,8 +49,8 @@ internal static StreamProperties Default EqualityComparerExpression.Default, null, null, - new Dictionary(), - new Dictionary(), + [], + [], null); internal static StreamProperties DefaultIngress(LambdaExpression startEdgeSelector, LambdaExpression endEdgeSelector) @@ -79,8 +79,8 @@ internal static StreamProperties DefaultIngress(LambdaExpression EqualityComparerExpression.Default, null, null, - new Dictionary(), - new Dictionary(), + [], + [], null); } @@ -605,8 +605,8 @@ internal StreamProperties SelectMany(LambdaExpression se this.IsIntervalFree, false, this.IsSnapshotSorted, false, this.KeyEqualityComparer, EqualityComparerExpression.Default, this.KeyComparer, newPayloadComparer, - new Dictionary(), - new Dictionary(), + [], + [], this.QueryContainer); } @@ -718,7 +718,7 @@ internal StreamProperties Union(StreamProperties result.IsSnapshotSorted = false; result.KeyComparer = null; result.PayloadComparer = null; - result.SortSelectorMap = new Dictionary(); + result.SortSelectorMap = []; // Union can be columnar only if both are result.IsColumnar = this.IsColumnar && right.IsColumnar; @@ -774,8 +774,8 @@ internal StreamProperties Join EqualityComparerExpression.Default, newKeyComparer, null, - new Dictionary(), - new Dictionary(), this.QueryContainer); + [], + [], this.QueryContainer); } /// @@ -907,11 +907,11 @@ internal sealed class VerifyPropertiesPipe : UnaryPipe lastSyncTimeForSimultaneous = new Dictionary(); + private readonly Dictionary lastSyncTimeForSimultaneous = []; [DataMember] private long lastSeenTimestamp = StreamEvent.MinSyncTime; [DataMember] - private readonly Dictionary lastSeenTimestampPartitioned = new Dictionary(); + private readonly Dictionary lastSeenTimestampPartitioned = []; [Obsolete("Used only by serialization. Do not call directly.")] public VerifyPropertiesPipe() { } diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamPropertiesExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamPropertiesExtensions.cs index 1ce4616b4..6e4f6f26c 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamPropertiesExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamPropertiesExtensions.cs @@ -38,8 +38,8 @@ internal static StreamProperties Ungroup.Default, newKeyComparer, null, - new Dictionary(), - new Dictionary(), + [], + [], source.QueryContainer); } @@ -59,8 +59,8 @@ internal static StreamProperties Ungroup.Default, null, null, - new Dictionary(), - new Dictionary(), + [], + [], source.QueryContainer); } diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/PivotExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/PivotExtensions.cs index a1f4cc306..19200a0e0 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/PivotExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/PivotExtensions.cs @@ -204,8 +204,8 @@ public static IStreamable Unpivot { - private readonly Dictionary> fields = new Dictionary>(); - private readonly Dictionary> isNull = new Dictionary>(); + private readonly Dictionary> fields = []; + private readonly Dictionary> isNull = []; public UnpivotEnumerable(Expression> keySelector, NewExpression newExpression, MemberExpression attributeField, MemberExpression valueField) { diff --git a/Sources/Core/Microsoft.StreamProcessing/Transformer/CommonBaseTemplate.cs b/Sources/Core/Microsoft.StreamProcessing/Transformer/CommonBaseTemplate.cs index 69f83649e..0f97475d3 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Transformer/CommonBaseTemplate.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Transformer/CommonBaseTemplate.cs @@ -26,7 +26,7 @@ internal abstract class CommonBaseTemplate /// /// A list of the lengths of each indent that was added with PushIndent /// - private List IndentLengths { get; } = new List(); + private List IndentLengths { get; } = []; /// /// Gets the current indent we use when adding lines to the output diff --git a/Sources/Core/Microsoft.StreamProcessing/Transformer/SelectTransformation.cs b/Sources/Core/Microsoft.StreamProcessing/Transformer/SelectTransformation.cs index 61d68635f..b2df55552 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Transformer/SelectTransformation.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Transformer/SelectTransformation.cs @@ -96,7 +96,7 @@ private SelectTransformer( bool doMultiStringTransform, bool hasStartEdge) { - this.parameterInformation = new Dictionary(); + this.parameterInformation = []; foreach (var tup in substitutionInformation) { this.parameterInformation.Add(tup.Item1, tup.Item2); @@ -105,10 +105,10 @@ private SelectTransformer( this.noSwingingFields = noSwingingFields; this.doMultiStringTransform = doMultiStringTransform; - this.swingingFields = new List>(); - this.computedFields = new Dictionary(); - this.multiStringOperations = new List(); - this.multiStringResultFields = new List(); + this.swingingFields = []; + this.computedFields = []; + this.multiStringOperations = []; + this.multiStringResultFields = []; var body = function.Body; diff --git a/Sources/Core/Microsoft.StreamProcessing/Transformer/TemplateClasses.cs b/Sources/Core/Microsoft.StreamProcessing/Transformer/TemplateClasses.cs index 92386842b..9b6ea98bc 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Transformer/TemplateClasses.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Transformer/TemplateClasses.cs @@ -365,7 +365,7 @@ public static IEnumerable AssemblyReferencesNeededFor(params Expressio private sealed class AssemblyLocationFinder : ExpressionVisitor { - private readonly HashSet assemblyLocations = new HashSet(); + private readonly HashSet assemblyLocations = []; private AssemblyLocationFinder() { } public static IEnumerable GetAssemblyLocationsFor(Expression e) @@ -612,7 +612,7 @@ internal sealed class ColumnarRepresentation public readonly MyFieldInfo PseudoField; // used only when noFields is true public IEnumerable AllFields => this.noFields - ? new List() { this.PseudoField } + ? [this.PseudoField] : this.Fields.Values; public ColumnarRepresentation(Type t) @@ -734,12 +734,10 @@ public static void GetGeneratedCode(Type keyType, Type payloadType, out string g { var template = new SafeBatchTemplate(); - assemblyReferences = new List - { - Transformer.SystemRuntimeSerializationDll // needed for [DataContract] and [DataMember] in generated code - }; - - assemblyReferences.AddRange(Transformer.AssemblyReferencesNeededFor(keyType)); + assemblyReferences = + [ + Transformer.SystemRuntimeSerializationDll, .. Transformer.AssemblyReferencesNeededFor(keyType) // needed for [DataContract] and [DataMember] in generated code + ]; template.keyType = keyType; assemblyReferences.AddRange(Transformer.AssemblyReferencesNeededFor(payloadType)); @@ -780,7 +778,7 @@ internal partial class MemoryPoolTemplate internal MemoryPoolTemplate(ColumnarRepresentation keyRepresentation, ColumnarRepresentation payloadRepresentation) { - this.assemblyReferences = new List(); + this.assemblyReferences = []; var keyType = keyRepresentation == null ? typeof(Empty) : keyRepresentation.RepresentationFor; diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/Config.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/Config.cs index 1f7d1cf20..c70a6bfd5 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/Config.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/Config.cs @@ -475,7 +475,7 @@ internal sealed class ConfigModifier private static readonly AsyncLocal gateDepth = new AsyncLocal(); // collection of Config modifications - private readonly List modifications = new List(); + private readonly List modifications = []; public ConfigModifier GeneratedCodePath(string value) { diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/ExpressionExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/ExpressionExtensions.cs index 94f5ccf96..40f4a6b17 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/ExpressionExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/ExpressionExtensions.cs @@ -188,7 +188,7 @@ protected override Expression VisitMethodCall(MethodCallExpression node) internal sealed class EqualityComparer : ExpressionVisitor { - private readonly Dictionary parameterMap = new Dictionary(); + private readonly Dictionary parameterMap = []; private int uniqueParameterNumber; private EqualityComparer() => this.uniqueParameterNumber = 0; @@ -353,7 +353,7 @@ private bool Equals(MemberBinding mb1, MemberBinding mb2) internal sealed class VariableFinder : ExpressionVisitor { - private readonly List foundVariables = new List(); + private readonly List foundVariables = []; public static List Find(Expression exp) { @@ -428,11 +428,11 @@ protected override Expression VisitParameter(ParameterExpression node) internal class ConvertToCSharp : ExpressionVisitor { public readonly TextWriter writer; - private readonly HashSet nonExpressionFeatures = new HashSet - { + private readonly HashSet nonExpressionFeatures = + [ ExpressionType.Loop, ExpressionType.Block - }; + ]; public ConvertToCSharp(TextWriter writer) => this.writer = writer ?? throw new ArgumentNullException(nameof(writer)); @@ -1266,8 +1266,8 @@ private ColumnOriented() { } var me = new ColumnOriented { - parameterTableForDecomposableTypes = new Dictionary, ParameterInformation>(), - parameterTableForAtomicTypes = new Dictionary() + parameterTableForDecomposableTypes = [], + parameterTableForAtomicTypes = [] }; var parameterMapping = new Dictionary(); var i = 0; diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/TypeExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/TypeExtensions.cs index ff24319a2..5a081a51a 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/TypeExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/TypeExtensions.cs @@ -32,7 +32,7 @@ static TypeExtensions() foreach (var pair in OperatorNameLookup) { KnownSupportedOperators.TryAdd( - pair.Key, new HashSet { typeof(long), typeof(ulong), typeof(int), typeof(uint), typeof(short), typeof(ushort), typeof(double), typeof(float), typeof(decimal), typeof(byte), typeof(sbyte) }); + pair.Key, [typeof(long), typeof(ulong), typeof(int), typeof(uint), typeof(short), typeof(ushort), typeof(double), typeof(float), typeof(decimal), typeof(byte), typeof(sbyte)]); } } @@ -518,7 +518,7 @@ public static string GetCSharpSourceSyntax(this Type t) public static string GetCSharpSourceSyntax(this Type t, ref List introducedGenericTypeParameters) { - if (introducedGenericTypeParameters == null) introducedGenericTypeParameters = new List(); + if (introducedGenericTypeParameters == null) introducedGenericTypeParameters = []; string ret = TurnTypeIntoCSharpSource(t, ref introducedGenericTypeParameters); return ret; } @@ -678,11 +678,11 @@ public static bool IsUnsupported(this Type type) && !type.GetTypeInfo().IsInterface && !(type.GetTypeInfo().IsGenericType && SupportedInterfaces.Contains(type.GetGenericTypeDefinition()))); - private static readonly HashSet SupportedInterfaces = new HashSet - { + private static readonly HashSet SupportedInterfaces = + [ typeof(IList<>), typeof(IDictionary<,>) - }; + ]; /// /// Validates that a type can be serialized. diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/Utility.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/Utility.cs index 7dc5c98d5..e6200adf6 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/Utility.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/Utility.cs @@ -91,7 +91,7 @@ public static void Add(this IDictionary> dict, { if (!dict.TryGetValue(key, out var list)) { - list = new List(); + list = []; dict.Add(key, list); } list.Add(value); diff --git a/Sources/Microsoft.StreamProcessing.ruleset b/Sources/Microsoft.StreamProcessing.ruleset deleted file mode 100644 index b9cb6cefc..000000000 --- a/Sources/Microsoft.StreamProcessing.ruleset +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Sources/Test/Directory.Build.props b/Sources/Test/Directory.Build.props index a3b945e01..b046b9e77 100644 --- a/Sources/Test/Directory.Build.props +++ b/Sources/Test/Directory.Build.props @@ -7,7 +7,6 @@ false - $(MSBuildThisFileDirectory)Microsoft.StreamProcessing.Test.ruleset prompt 4 true @@ -27,8 +26,4 @@ - - - - diff --git a/Sources/Test/Microsoft.StreamProcessing.Test.ruleset b/Sources/Test/Microsoft.StreamProcessing.Test.ruleset deleted file mode 100644 index c656edfee..000000000 --- a/Sources/Test/Microsoft.StreamProcessing.Test.ruleset +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/Sources/Test/SimpleTesting/AdHocTests.cs b/Sources/Test/SimpleTesting/AdHocTests.cs index f201a7204..0e861838b 100644 --- a/Sources/Test/SimpleTesting/AdHocTests.cs +++ b/Sources/Test/SimpleTesting/AdHocTests.cs @@ -405,7 +405,7 @@ public void UnderFlowFalseFlush() OnCompletedPolicy.None); var output = new List>(); - var egress = qc.RegisterOutput(ingress).ForEachAsync(o => output.Add(o)); + var egress = qc.RegisterOutput(ingress).ForEachAsync(output.Add); var process = qc.Restore(); process.Flush(); egress.Wait(); @@ -507,7 +507,7 @@ public void InactiveAndNewPartitions() OnCompletedPolicy.EndOfStream); var output = new List>(); - var egress = qc.RegisterOutput(ingress).ForEachAsync(o => output.Add(o)); + var egress = qc.RegisterOutput(ingress).ForEachAsync(output.Add); var process = qc.Restore(); process.Flush(); egress.Wait(); @@ -547,7 +547,7 @@ public void FileStreamPassthrough() // Stream from file var fromFile = filePath.ToStreamableFromFile(readPropertiesFromStream: serializeStreamProperties); var output = new List>(); - fromFile.ToStreamEventObservable().Where(e => e.IsData).ForEachAsync(r => output.Add(r)).Wait(); + fromFile.ToStreamEventObservable().Where(e => e.IsData).ForEachAsync(output.Add).Wait(); Assert.IsTrue(inputData.SequenceEqual(output)); } @@ -579,7 +579,7 @@ public void FileStreamDoubleQuery() for (int i = 0; i < 2; i++) { var output = new List>(); - streamable.ToStreamEventObservable().Where(e => e.IsData).ForEachAsync(e => output.Add(e)).Wait(); + streamable.ToStreamEventObservable().Where(e => e.IsData).ForEachAsync(output.Add).Wait(); Assert.IsTrue(inputData.SequenceEqual(output)); } } @@ -651,7 +651,7 @@ public void ExplicitAndGeneratedLowWatermarks() var output = new List>(); input.ToStreamEventObservable() - .ForEachAsync(x => output.Add(x)) + .ForEachAsync(output.Add) .Wait(); var expected = new List> @@ -863,7 +863,7 @@ public void LASJ_OutOfOrderLWM() e => e); var output = new List>(); - var egress = qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + var egress = qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); process.Flush(); egress.Wait(); @@ -898,7 +898,7 @@ public void SimpleShardTest() .Unshard() .ToStreamEventObservable() .Where(e => e.IsData) - .ForEachAsync(e => output.Add(e)); + .ForEachAsync(output.Add); Assert.IsTrue(output.SequenceEqual(input)); } @@ -957,7 +957,7 @@ public void AggressivePartitionCleanup_LASJ() e => e); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Set up state so that the left has an "invisible" (i.e. unmatched on the right) interval. @@ -1045,7 +1045,7 @@ public void AggressivePartitionCleanup_EquiJoin() (l, r) => l); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Set up state so that there is outstanding start edges/intervals @@ -1129,7 +1129,7 @@ public void AggressivePartitionCleanup_Clip() e => e); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Set up state so that there is outstanding start edges/intervals @@ -1190,7 +1190,7 @@ public void OutOfOrderRepro() var input = new Subject>(); var ingress = qc.RegisterInput(input, DisorderPolicy.Drop(reorderLatency: 500)); var output = new List>(); - var egress = qc.RegisterOutput(ingress).ForEachAsync(o => output.Add(o)); + var egress = qc.RegisterOutput(ingress).ForEachAsync(output.Add); var process = qc.Restore(); // These will be buffered due to reorderLatency @@ -1247,7 +1247,7 @@ public void ColumnarUngroupNullRefRepro() (g, byNamePayload) => new Payload { GroupId = g.Key, Name = byNamePayload.Name, Reading = byNamePayload.Reading }) .ToStreamEventObservable()); var output = new List>(); - var egress = qc.RegisterOutput(ingress).Where(e => e.IsData).ForEachAsync(o => output.Add(o)); + var egress = qc.RegisterOutput(ingress).Where(e => e.IsData).ForEachAsync(output.Add); var process = qc.Restore(); process.Flush(); egress.Wait(); @@ -1349,16 +1349,16 @@ public void PublishTest1() var input = inputSubject.ToStreamable().SetProperty().IsConstantDuration(true, StreamEvent.InfinitySyncTime).Publish(); - var output1 = input.ToStreamEventObservable().Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(x => outputList1.Add(x)); + var output1 = input.ToStreamEventObservable().Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList1.Add); input.Connect(); - preConnectData.ForEachAsync(x => inputSubject.OnNext(x)).Wait(); + preConnectData.ForEachAsync(inputSubject.OnNext).Wait(); inputSubject.OnNext(StreamEvent.CreatePunctuation(1)); - var output2 = input.ToStreamEventObservable().Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(x => outputList2.Add(x)); + var output2 = input.ToStreamEventObservable().Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList2.Add); - postConnectData.ForEachAsync(x => inputSubject.OnNext(x)).Wait(); + postConnectData.ForEachAsync(inputSubject.OnNext).Wait(); inputSubject.OnCompleted(); @@ -1750,10 +1750,7 @@ private void CommonInitialize() var result = Query(inputEvents); var resultObs = this.container.RegisterOutput(result); - resultObs.Subscribe(x => - { - this.results.Enqueue(x); - }); + resultObs.Subscribe(this.results.Enqueue); } internal QueryProcessor() @@ -1844,7 +1841,7 @@ public void LeftJoinOutOfOrder() s => s, s => s, e1 => e1, - (e1, e2) => null)).ForEachAsync(o => output.Add(o)); + (e1, e2) => null)).ForEachAsync(output.Add); var process = qc.Restore(); // This test used to rely on lagAllowance=50 and (Global)PeriodicPunctuationPolicy=10 to generate global punctuations and flush contents. @@ -2174,7 +2171,7 @@ public void UnionWithOneColumnarAndOneNot01() .ToStreamEventObservable() .Where(e => e.IsData) .Select(e => e.Payload) - .ForEachAsync(x => outputList.Add(x)); + .ForEachAsync(outputList.Add); streamResult.Connect(); @@ -2212,7 +2209,7 @@ public void UnionWithOneColumnarAndOneNot02() .ToStreamEventObservable() .Where(e => e.IsData) .Select(e => e.Payload) - .ForEachAsync(x => outputList.Add(x)); + .ForEachAsync(outputList.Add); streamResult.Connect(); diff --git a/Sources/Test/SimpleTesting/Aggregates/PerKeyAggregate.cs b/Sources/Test/SimpleTesting/Aggregates/PerKeyAggregate.cs index c3acc3535..5998c5884 100644 --- a/Sources/Test/SimpleTesting/Aggregates/PerKeyAggregate.cs +++ b/Sources/Test/SimpleTesting/Aggregates/PerKeyAggregate.cs @@ -4,7 +4,6 @@ // ********************************************************************* using System; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reactive.Linq; using Microsoft.StreamProcessing; @@ -13,7 +12,6 @@ namespace SimpleTesting { - [SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1009", Justification = "Reviewed.")] [TestClass] public class AggregateByKey : TestWithConfigSettingsAndMemoryLeakDetection { @@ -149,7 +147,7 @@ public void TestAggregateByKeyTupleDecomposition() input .GroupAggregate(s => true, w => w.Count(), (g, c) => ValueTuple.Create(g.Key, c)) .ToStreamEventObservable() - .ForEachAsync(e => output.Add(e)) + .ForEachAsync(output.Add) .Wait(); var correct = new[] diff --git a/Sources/Test/SimpleTesting/CheckpointRestoreTests.cs b/Sources/Test/SimpleTesting/CheckpointRestoreTests.cs index 1a0d6a350..2cae343d3 100644 --- a/Sources/Test/SimpleTesting/CheckpointRestoreTests.cs +++ b/Sources/Test/SimpleTesting/CheckpointRestoreTests.cs @@ -71,9 +71,9 @@ public void BasicUnaryCheckpointHoppingWindowSumRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -83,10 +83,10 @@ public void BasicUnaryCheckpointHoppingWindowSumRow() var query2 = input2.HoppingWindowLifetime(window, period).Sum(e => (ulong)e); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((x, y) => @@ -104,7 +104,7 @@ public void BasicUnaryCheckpointHoppingWindowSumRow() var query3 = input3.HoppingWindowLifetime(window, period).Sum(e => (ulong)e); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); outputListWithoutCheckpoint.Sort((x, y) => @@ -200,9 +200,9 @@ public void BasicUnaryCheckpoint0Row() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -212,9 +212,9 @@ public void BasicUnaryCheckpoint0Row() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -224,7 +224,7 @@ public void BasicUnaryCheckpoint0Row() var query3 = CreateBasicQuery(input3); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -265,9 +265,9 @@ public void BasicUnaryCheckpointDisorderPolicyRow() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -277,9 +277,9 @@ public void BasicUnaryCheckpointDisorderPolicyRow() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -289,7 +289,7 @@ public void BasicUnaryCheckpointDisorderPolicyRow() var query3 = CreateBasicQuery(input3); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -333,9 +333,9 @@ public void BasicMulticastCheckpoint0Row() var query1 = query1_left.Union(query1right); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -348,9 +348,9 @@ public void BasicMulticastCheckpoint0Row() var query2 = query2_left.Union(query2right); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -363,7 +363,7 @@ public void BasicMulticastCheckpoint0Row() var query3 = query3_left.Union(query3right); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); outputListWithoutCheckpoint.Sort(); @@ -408,7 +408,7 @@ public void BasicUnaryCheckpointAnonTypeSelectManyRow() var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o.p)); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -420,7 +420,7 @@ public void BasicUnaryCheckpointAnonTypeSelectManyRow() var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o.p)); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -472,9 +472,9 @@ public void BasicUnaryCheckpointCountRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -484,9 +484,9 @@ public void BasicUnaryCheckpointCountRow() var query2 = input2.Count(); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -496,7 +496,7 @@ public void BasicUnaryCheckpointCountRow() var query3 = input3.Count(); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -538,9 +538,9 @@ public void BasicUnaryCheckpointGroupedSumRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -550,9 +550,9 @@ public void BasicUnaryCheckpointGroupedSumRow() var query2 = input2.GroupApply(e => e.Item1, str => str.Sum(e => (ulong)e.Item2), (g, c) => new StructTuple { Item1 = g.Key, Item2 = c }); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((a, b) => a.Item1.CompareTo(b.Item1) == 0 ? a.Item2.CompareTo(b.Item2) : a.Item1.CompareTo(b.Item1)); @@ -562,7 +562,7 @@ public void BasicUnaryCheckpointGroupedSumRow() var query3 = input3.GroupApply(e => e.Item1, str => str.Sum(e => (ulong)e.Item2), (g, c) => new StructTuple { Item1 = g.Key, Item2 = c }); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -620,11 +620,11 @@ public void BasicUnaryCheckpointEquiJoinRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -636,11 +636,11 @@ public void BasicUnaryCheckpointEquiJoinRow() var query2 = input21.Join(input22, e => e.Item1, e => e.Item1, (l, r) => new StructTuple { Item1 = l.Item1, Item2 = r.Item2 }); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -652,7 +652,7 @@ public void BasicUnaryCheckpointEquiJoinRow() var query3 = input31.Join(input32, e => e.Item1, e => e.Item1, (l, r) => new StructTuple { Item1 = l.Item1, Item2 = r.Item2 }); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -713,11 +713,11 @@ public void BasicUnaryCheckpointLASJRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -729,11 +729,11 @@ public void BasicUnaryCheckpointLASJRow() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -745,7 +745,7 @@ public void BasicUnaryCheckpointLASJRow() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -806,11 +806,11 @@ public void LeftUnaryCheckpointLASJRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -822,11 +822,11 @@ public void LeftUnaryCheckpointLASJRow() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -838,7 +838,7 @@ public void LeftUnaryCheckpointLASJRow() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -899,11 +899,11 @@ public void RightUnaryCheckpointLASJRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -915,11 +915,11 @@ public void RightUnaryCheckpointLASJRow() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -931,7 +931,7 @@ public void RightUnaryCheckpointLASJRow() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -977,10 +977,10 @@ public void SelfUnaryCheckpointLASJRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); @@ -991,10 +991,10 @@ public void SelfUnaryCheckpointLASJRow() var query2 = input2.GroupApply(o => 1, s => s.Multicast(p => p.WhereNotExists(p.Where(i => false), e => e.Item1, e => e.Item1))); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((a, b) => a.Item1.CompareTo(b.Item1) == 0 ? a.Item2.CompareTo(b.Item2) : a.Item1.CompareTo(b.Item1)); @@ -1004,7 +1004,7 @@ public void SelfUnaryCheckpointLASJRow() var query3 = input3.GroupApply(o => 1, s => s.Multicast(p => p.WhereNotExists(p.Where(i => false), e => e.Item1, e => e.Item1))); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -1064,11 +1064,11 @@ public void BasicUnaryCheckpointClipRow() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -1080,11 +1080,11 @@ public void BasicUnaryCheckpointClipRow() var query2 = input21.ClipEventDuration(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -1096,7 +1096,7 @@ public void BasicUnaryCheckpointClipRow() var query3 = input31.ClipEventDuration(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -1139,7 +1139,7 @@ public void BasicEmptyCheckpointErrorRow() var query1 = query1_left.Union(query1right); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); try { @@ -1185,9 +1185,9 @@ public void BasicUnaryCheckpointErrorRow() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1197,9 +1197,9 @@ public void BasicUnaryCheckpointErrorRow() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); outputAsync2.Wait(); } catch (AggregateException e) @@ -1243,9 +1243,9 @@ public void BasicDisorderPolicyErrorRow() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1257,9 +1257,9 @@ public void BasicDisorderPolicyErrorRow() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); } @@ -1300,9 +1300,9 @@ public void BasicDisorderAdjustPolicyRow() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1312,9 +1312,9 @@ public void BasicDisorderAdjustPolicyRow() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); @@ -1542,9 +1542,9 @@ public void BasicUnaryCheckpointHoppingWindowSumRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1554,10 +1554,10 @@ public void BasicUnaryCheckpointHoppingWindowSumRowSmallBatch() var query2 = input2.HoppingWindowLifetime(window, period).Sum(e => (ulong)e); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((x, y) => @@ -1575,7 +1575,7 @@ public void BasicUnaryCheckpointHoppingWindowSumRowSmallBatch() var query3 = input3.HoppingWindowLifetime(window, period).Sum(e => (ulong)e); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); outputListWithoutCheckpoint.Sort((x, y) => @@ -1672,9 +1672,9 @@ public void BasicUnaryCheckpoint0RowSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1684,9 +1684,9 @@ public void BasicUnaryCheckpoint0RowSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -1696,7 +1696,7 @@ public void BasicUnaryCheckpoint0RowSmallBatch() var query3 = CreateBasicQuery(input3); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -1737,9 +1737,9 @@ public void BasicUnaryCheckpointDisorderPolicyRowSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1749,9 +1749,9 @@ public void BasicUnaryCheckpointDisorderPolicyRowSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -1761,7 +1761,7 @@ public void BasicUnaryCheckpointDisorderPolicyRowSmallBatch() var query3 = CreateBasicQuery(input3); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -1805,9 +1805,9 @@ public void BasicMulticastCheckpoint0RowSmallBatch() var query1 = query1_left.Union(query1right); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1820,9 +1820,9 @@ public void BasicMulticastCheckpoint0RowSmallBatch() var query2 = query2_left.Union(query2right); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -1835,7 +1835,7 @@ public void BasicMulticastCheckpoint0RowSmallBatch() var query3 = query3_left.Union(query3right); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); outputListWithoutCheckpoint.Sort(); @@ -1880,7 +1880,7 @@ public void BasicUnaryCheckpointAnonTypeSelectManyRowSmallBatch() var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o.p)); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1892,7 +1892,7 @@ public void BasicUnaryCheckpointAnonTypeSelectManyRowSmallBatch() var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o.p)); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -1944,9 +1944,9 @@ public void BasicUnaryCheckpointCountRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -1956,9 +1956,9 @@ public void BasicUnaryCheckpointCountRowSmallBatch() var query2 = input2.Count(); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -1968,7 +1968,7 @@ public void BasicUnaryCheckpointCountRowSmallBatch() var query3 = input3.Count(); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -2010,9 +2010,9 @@ public void BasicUnaryCheckpointGroupedSumRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -2022,9 +2022,9 @@ public void BasicUnaryCheckpointGroupedSumRowSmallBatch() var query2 = input2.GroupApply(e => e.Item1, str => str.Sum(e => (ulong)e.Item2), (g, c) => new StructTuple { Item1 = g.Key, Item2 = c }); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((a, b) => a.Item1.CompareTo(b.Item1) == 0 ? a.Item2.CompareTo(b.Item2) : a.Item1.CompareTo(b.Item1)); @@ -2034,7 +2034,7 @@ public void BasicUnaryCheckpointGroupedSumRowSmallBatch() var query3 = input3.GroupApply(e => e.Item1, str => str.Sum(e => (ulong)e.Item2), (g, c) => new StructTuple { Item1 = g.Key, Item2 = c }); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -2092,11 +2092,11 @@ public void BasicUnaryCheckpointEquiJoinRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -2108,11 +2108,11 @@ public void BasicUnaryCheckpointEquiJoinRowSmallBatch() var query2 = input21.Join(input22, e => e.Item1, e => e.Item1, (l, r) => new StructTuple { Item1 = l.Item1, Item2 = r.Item2 }); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -2124,7 +2124,7 @@ public void BasicUnaryCheckpointEquiJoinRowSmallBatch() var query3 = input31.Join(input32, e => e.Item1, e => e.Item1, (l, r) => new StructTuple { Item1 = l.Item1, Item2 = r.Item2 }); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -2185,11 +2185,11 @@ public void BasicUnaryCheckpointLASJRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -2201,11 +2201,11 @@ public void BasicUnaryCheckpointLASJRowSmallBatch() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -2217,7 +2217,7 @@ public void BasicUnaryCheckpointLASJRowSmallBatch() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -2278,11 +2278,11 @@ public void LeftUnaryCheckpointLASJRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -2294,11 +2294,11 @@ public void LeftUnaryCheckpointLASJRowSmallBatch() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -2310,7 +2310,7 @@ public void LeftUnaryCheckpointLASJRowSmallBatch() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -2371,11 +2371,11 @@ public void RightUnaryCheckpointLASJRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -2387,11 +2387,11 @@ public void RightUnaryCheckpointLASJRowSmallBatch() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -2403,7 +2403,7 @@ public void RightUnaryCheckpointLASJRowSmallBatch() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -2449,10 +2449,10 @@ public void SelfUnaryCheckpointLASJRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); @@ -2463,10 +2463,10 @@ public void SelfUnaryCheckpointLASJRowSmallBatch() var query2 = input2.GroupApply(o => 1, s => s.Multicast(p => p.WhereNotExists(p.Where(i => false), e => e.Item1, e => e.Item1))); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((a, b) => a.Item1.CompareTo(b.Item1) == 0 ? a.Item2.CompareTo(b.Item2) : a.Item1.CompareTo(b.Item1)); @@ -2476,7 +2476,7 @@ public void SelfUnaryCheckpointLASJRowSmallBatch() var query3 = input3.GroupApply(o => 1, s => s.Multicast(p => p.WhereNotExists(p.Where(i => false), e => e.Item1, e => e.Item1))); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -2536,11 +2536,11 @@ public void BasicUnaryCheckpointClipRowSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -2552,11 +2552,11 @@ public void BasicUnaryCheckpointClipRowSmallBatch() var query2 = input21.ClipEventDuration(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -2568,7 +2568,7 @@ public void BasicUnaryCheckpointClipRowSmallBatch() var query3 = input31.ClipEventDuration(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -2611,7 +2611,7 @@ public void BasicEmptyCheckpointErrorRowSmallBatch() var query1 = query1_left.Union(query1right); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); try { @@ -2657,9 +2657,9 @@ public void BasicUnaryCheckpointErrorRowSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -2669,9 +2669,9 @@ public void BasicUnaryCheckpointErrorRowSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); outputAsync2.Wait(); } catch (AggregateException e) @@ -2715,9 +2715,9 @@ public void BasicDisorderPolicyErrorRowSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -2729,9 +2729,9 @@ public void BasicDisorderPolicyErrorRowSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); } @@ -2772,9 +2772,9 @@ public void BasicDisorderAdjustPolicyRowSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -2784,9 +2784,9 @@ public void BasicDisorderAdjustPolicyRowSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); @@ -3013,9 +3013,9 @@ public void BasicUnaryCheckpointHoppingWindowSumColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -3025,10 +3025,10 @@ public void BasicUnaryCheckpointHoppingWindowSumColumnar() var query2 = input2.HoppingWindowLifetime(window, period).Sum(e => (ulong)e); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((x, y) => @@ -3046,7 +3046,7 @@ public void BasicUnaryCheckpointHoppingWindowSumColumnar() var query3 = input3.HoppingWindowLifetime(window, period).Sum(e => (ulong)e); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); outputListWithoutCheckpoint.Sort((x, y) => @@ -3142,9 +3142,9 @@ public void BasicUnaryCheckpoint0Columnar() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -3154,9 +3154,9 @@ public void BasicUnaryCheckpoint0Columnar() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -3166,7 +3166,7 @@ public void BasicUnaryCheckpoint0Columnar() var query3 = CreateBasicQuery(input3); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -3207,9 +3207,9 @@ public void BasicUnaryCheckpointDisorderPolicyColumnar() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -3219,9 +3219,9 @@ public void BasicUnaryCheckpointDisorderPolicyColumnar() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -3231,7 +3231,7 @@ public void BasicUnaryCheckpointDisorderPolicyColumnar() var query3 = CreateBasicQuery(input3); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -3275,9 +3275,9 @@ public void BasicMulticastCheckpoint0Columnar() var query1 = query1_left.Union(query1right); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -3290,9 +3290,9 @@ public void BasicMulticastCheckpoint0Columnar() var query2 = query2_left.Union(query2right); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -3305,7 +3305,7 @@ public void BasicMulticastCheckpoint0Columnar() var query3 = query3_left.Union(query3right); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); outputListWithoutCheckpoint.Sort(); @@ -3350,7 +3350,7 @@ public void BasicUnaryCheckpointAnonTypeSelectManyColumnar() var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o.p)); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -3362,7 +3362,7 @@ public void BasicUnaryCheckpointAnonTypeSelectManyColumnar() var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o.p)); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -3414,9 +3414,9 @@ public void BasicUnaryCheckpointCountColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -3426,9 +3426,9 @@ public void BasicUnaryCheckpointCountColumnar() var query2 = input2.Count(); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -3438,7 +3438,7 @@ public void BasicUnaryCheckpointCountColumnar() var query3 = input3.Count(); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -3480,9 +3480,9 @@ public void BasicUnaryCheckpointGroupedSumColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -3492,9 +3492,9 @@ public void BasicUnaryCheckpointGroupedSumColumnar() var query2 = input2.GroupApply(e => e.Item1, str => str.Sum(e => (ulong)e.Item2), (g, c) => new StructTuple { Item1 = g.Key, Item2 = c }); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((a, b) => a.Item1.CompareTo(b.Item1) == 0 ? a.Item2.CompareTo(b.Item2) : a.Item1.CompareTo(b.Item1)); @@ -3504,7 +3504,7 @@ public void BasicUnaryCheckpointGroupedSumColumnar() var query3 = input3.GroupApply(e => e.Item1, str => str.Sum(e => (ulong)e.Item2), (g, c) => new StructTuple { Item1 = g.Key, Item2 = c }); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -3562,11 +3562,11 @@ public void BasicUnaryCheckpointEquiJoinColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -3578,11 +3578,11 @@ public void BasicUnaryCheckpointEquiJoinColumnar() var query2 = input21.Join(input22, e => e.Item1, e => e.Item1, (l, r) => new StructTuple { Item1 = l.Item1, Item2 = r.Item2 }); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -3594,7 +3594,7 @@ public void BasicUnaryCheckpointEquiJoinColumnar() var query3 = input31.Join(input32, e => e.Item1, e => e.Item1, (l, r) => new StructTuple { Item1 = l.Item1, Item2 = r.Item2 }); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -3655,11 +3655,11 @@ public void BasicUnaryCheckpointLASJColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -3671,11 +3671,11 @@ public void BasicUnaryCheckpointLASJColumnar() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -3687,7 +3687,7 @@ public void BasicUnaryCheckpointLASJColumnar() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -3748,11 +3748,11 @@ public void LeftUnaryCheckpointLASJColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -3764,11 +3764,11 @@ public void LeftUnaryCheckpointLASJColumnar() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -3780,7 +3780,7 @@ public void LeftUnaryCheckpointLASJColumnar() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -3841,11 +3841,11 @@ public void RightUnaryCheckpointLASJColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -3857,11 +3857,11 @@ public void RightUnaryCheckpointLASJColumnar() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -3873,7 +3873,7 @@ public void RightUnaryCheckpointLASJColumnar() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -3919,10 +3919,10 @@ public void SelfUnaryCheckpointLASJColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); @@ -3933,10 +3933,10 @@ public void SelfUnaryCheckpointLASJColumnar() var query2 = input2.GroupApply(o => 1, s => s.Multicast(p => p.WhereNotExists(p.Where(i => false), e => e.Item1, e => e.Item1))); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((a, b) => a.Item1.CompareTo(b.Item1) == 0 ? a.Item2.CompareTo(b.Item2) : a.Item1.CompareTo(b.Item1)); @@ -3946,7 +3946,7 @@ public void SelfUnaryCheckpointLASJColumnar() var query3 = input3.GroupApply(o => 1, s => s.Multicast(p => p.WhereNotExists(p.Where(i => false), e => e.Item1, e => e.Item1))); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -4006,11 +4006,11 @@ public void BasicUnaryCheckpointClipColumnar() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -4022,11 +4022,11 @@ public void BasicUnaryCheckpointClipColumnar() var query2 = input21.ClipEventDuration(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -4038,7 +4038,7 @@ public void BasicUnaryCheckpointClipColumnar() var query3 = input31.ClipEventDuration(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -4081,7 +4081,7 @@ public void BasicEmptyCheckpointErrorColumnar() var query1 = query1_left.Union(query1right); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); try { @@ -4127,9 +4127,9 @@ public void BasicUnaryCheckpointErrorColumnar() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4139,9 +4139,9 @@ public void BasicUnaryCheckpointErrorColumnar() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); outputAsync2.Wait(); } catch (AggregateException e) @@ -4185,9 +4185,9 @@ public void BasicDisorderPolicyErrorColumnar() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4199,9 +4199,9 @@ public void BasicDisorderPolicyErrorColumnar() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); } @@ -4242,9 +4242,9 @@ public void BasicDisorderAdjustPolicyColumnar() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4254,9 +4254,9 @@ public void BasicDisorderAdjustPolicyColumnar() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); @@ -4484,9 +4484,9 @@ public void BasicUnaryCheckpointHoppingWindowSumColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4496,10 +4496,10 @@ public void BasicUnaryCheckpointHoppingWindowSumColumnarSmallBatch() var query2 = input2.HoppingWindowLifetime(window, period).Sum(e => (ulong)e); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((x, y) => @@ -4517,7 +4517,7 @@ public void BasicUnaryCheckpointHoppingWindowSumColumnarSmallBatch() var query3 = input3.HoppingWindowLifetime(window, period).Sum(e => (ulong)e); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); outputListWithoutCheckpoint.Sort((x, y) => @@ -4614,9 +4614,9 @@ public void BasicUnaryCheckpoint0ColumnarSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4626,9 +4626,9 @@ public void BasicUnaryCheckpoint0ColumnarSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -4638,7 +4638,7 @@ public void BasicUnaryCheckpoint0ColumnarSmallBatch() var query3 = CreateBasicQuery(input3); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -4679,9 +4679,9 @@ public void BasicUnaryCheckpointDisorderPolicyColumnarSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4691,9 +4691,9 @@ public void BasicUnaryCheckpointDisorderPolicyColumnarSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -4703,7 +4703,7 @@ public void BasicUnaryCheckpointDisorderPolicyColumnarSmallBatch() var query3 = CreateBasicQuery(input3); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -4747,9 +4747,9 @@ public void BasicMulticastCheckpoint0ColumnarSmallBatch() var query1 = query1_left.Union(query1right); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4762,9 +4762,9 @@ public void BasicMulticastCheckpoint0ColumnarSmallBatch() var query2 = query2_left.Union(query2right); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -4777,7 +4777,7 @@ public void BasicMulticastCheckpoint0ColumnarSmallBatch() var query3 = query3_left.Union(query3right); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); outputListWithoutCheckpoint.Sort(); @@ -4822,7 +4822,7 @@ public void BasicUnaryCheckpointAnonTypeSelectManyColumnarSmallBatch() var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o.p)); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4834,7 +4834,7 @@ public void BasicUnaryCheckpointAnonTypeSelectManyColumnarSmallBatch() var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o.p)); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -4886,9 +4886,9 @@ public void BasicUnaryCheckpointCountColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4898,9 +4898,9 @@ public void BasicUnaryCheckpointCountColumnarSmallBatch() var query2 = input2.Count(); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort(); @@ -4910,7 +4910,7 @@ public void BasicUnaryCheckpointCountColumnarSmallBatch() var query3 = input3.Count(); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -4952,9 +4952,9 @@ public void BasicUnaryCheckpointGroupedSumColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -4964,9 +4964,9 @@ public void BasicUnaryCheckpointGroupedSumColumnarSmallBatch() var query2 = input2.GroupApply(e => e.Item1, str => str.Sum(e => (ulong)e.Item2), (g, c) => new StructTuple { Item1 = g.Key, Item2 = c }); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((a, b) => a.Item1.CompareTo(b.Item1) == 0 ? a.Item2.CompareTo(b.Item2) : a.Item1.CompareTo(b.Item1)); @@ -4976,7 +4976,7 @@ public void BasicUnaryCheckpointGroupedSumColumnarSmallBatch() var query3 = input3.GroupApply(e => e.Item1, str => str.Sum(e => (ulong)e.Item2), (g, c) => new StructTuple { Item1 = g.Key, Item2 = c }); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -5034,11 +5034,11 @@ public void BasicUnaryCheckpointEquiJoinColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -5050,11 +5050,11 @@ public void BasicUnaryCheckpointEquiJoinColumnarSmallBatch() var query2 = input21.Join(input22, e => e.Item1, e => e.Item1, (l, r) => new StructTuple { Item1 = l.Item1, Item2 = r.Item2 }); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -5066,7 +5066,7 @@ public void BasicUnaryCheckpointEquiJoinColumnarSmallBatch() var query3 = input31.Join(input32, e => e.Item1, e => e.Item1, (l, r) => new StructTuple { Item1 = l.Item1, Item2 = r.Item2 }); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -5127,11 +5127,11 @@ public void BasicUnaryCheckpointLASJColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -5143,11 +5143,11 @@ public void BasicUnaryCheckpointLASJColumnarSmallBatch() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -5159,7 +5159,7 @@ public void BasicUnaryCheckpointLASJColumnarSmallBatch() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -5220,11 +5220,11 @@ public void LeftUnaryCheckpointLASJColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -5236,11 +5236,11 @@ public void LeftUnaryCheckpointLASJColumnarSmallBatch() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -5252,7 +5252,7 @@ public void LeftUnaryCheckpointLASJColumnarSmallBatch() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -5313,11 +5313,11 @@ public void RightUnaryCheckpointLASJColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -5329,11 +5329,11 @@ public void RightUnaryCheckpointLASJColumnarSmallBatch() var query2 = input21.WhereNotExists(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -5345,7 +5345,7 @@ public void RightUnaryCheckpointLASJColumnarSmallBatch() var query3 = input31.WhereNotExists(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -5391,10 +5391,10 @@ public void SelfUnaryCheckpointLASJColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); @@ -5405,10 +5405,10 @@ public void SelfUnaryCheckpointLASJColumnarSmallBatch() var query2 = input2.GroupApply(o => 1, s => s.Multicast(p => p.WhereNotExists(p.Where(i => false), e => e.Item1, e => e.Item1))); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); outputListWithCheckpoint.Sort((a, b) => a.Item1.CompareTo(b.Item1) == 0 ? a.Item2.CompareTo(b.Item2) : a.Item1.CompareTo(b.Item1)); @@ -5418,7 +5418,7 @@ public void SelfUnaryCheckpointLASJColumnarSmallBatch() var query3 = input3.GroupApply(o => 1, s => s.Multicast(p => p.WhereNotExists(p.Where(i => false), e => e.Item1, e => e.Item1))); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -5478,11 +5478,11 @@ public void BasicUnaryCheckpointClipColumnarSmallBatch() var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe1 = container1.Restore(null); - preCheckpointData1.ForEachAsync(e => preCheckpointSubject1.OnNext(e)).Wait(); - preCheckpointData2.ForEachAsync(e => preCheckpointSubject2.OnNext(e)).Wait(); + preCheckpointData1.ForEachAsync(preCheckpointSubject1.OnNext).Wait(); + preCheckpointData2.ForEachAsync(preCheckpointSubject2.OnNext).Wait(); pipe1.Checkpoint(state); @@ -5494,11 +5494,11 @@ public void BasicUnaryCheckpointClipColumnarSmallBatch() var query2 = input21.ClipEventDuration(input22, e => e.Item1, e => e.Item1); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); var pipe2 = container2.Restore(state); - postCheckpointData1.ForEachAsync(e => postCheckpointSubject1.OnNext(e)).Wait(); - postCheckpointData2.ForEachAsync(e => postCheckpointSubject2.OnNext(e)).Wait(); + postCheckpointData1.ForEachAsync(postCheckpointSubject1.OnNext).Wait(); + postCheckpointData2.ForEachAsync(postCheckpointSubject2.OnNext).Wait(); postCheckpointSubject1.OnCompleted(); postCheckpointSubject2.OnCompleted(); outputAsync2.Wait(); @@ -5510,7 +5510,7 @@ public void BasicUnaryCheckpointClipColumnarSmallBatch() var query3 = input31.ClipEventDuration(input32, e => e.Item1, e => e.Item1); var output3 = container3.RegisterOutput(query3); - var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithoutCheckpoint.Add(o)); + var outputAsync3 = output3.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithoutCheckpoint.Add); container3.Restore(null); outputAsync3.Wait(); @@ -5553,7 +5553,7 @@ public void BasicEmptyCheckpointErrorColumnarSmallBatch() var query1 = query1_left.Union(query1right); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputListWithCheckpoint.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputListWithCheckpoint.Add); try { @@ -5599,9 +5599,9 @@ public void BasicUnaryCheckpointErrorColumnarSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -5611,9 +5611,9 @@ public void BasicUnaryCheckpointErrorColumnarSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); outputAsync2.Wait(); } catch (AggregateException e) @@ -5657,9 +5657,9 @@ public void BasicDisorderPolicyErrorColumnarSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -5671,9 +5671,9 @@ public void BasicDisorderPolicyErrorColumnarSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); } @@ -5714,9 +5714,9 @@ public void BasicDisorderAdjustPolicyColumnarSmallBatch() var query1 = CreateBasicQuery(input1); var output1 = container1.RegisterOutput(query1); - var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync1 = output1.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe1 = container1.Restore(null); - preCheckpointData.ForEachAsync(e => preCheckpointSubject.OnNext(e)).Wait(); + preCheckpointData.ForEachAsync(preCheckpointSubject.OnNext).Wait(); pipe1.Checkpoint(state); state.Seek(0, SeekOrigin.Begin); @@ -5726,9 +5726,9 @@ public void BasicDisorderAdjustPolicyColumnarSmallBatch() var query2 = CreateBasicQuery(input2); var output2 = container2.RegisterOutput(query2); - var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync2 = output2.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); var pipe2 = container2.Restore(state); - postCheckpointData.ForEachAsync(e => postCheckpointSubject.OnNext(e)).Wait(); + postCheckpointData.ForEachAsync(postCheckpointSubject.OnNext).Wait(); postCheckpointSubject.OnCompleted(); outputAsync2.Wait(); diff --git a/Sources/Test/SimpleTesting/ColumnarTests.cs b/Sources/Test/SimpleTesting/ColumnarTests.cs index ea06778aa..9e43a7627 100644 --- a/Sources/Test/SimpleTesting/ColumnarTests.cs +++ b/Sources/Test/SimpleTesting/ColumnarTests.cs @@ -4,7 +4,6 @@ // ********************************************************************* using System; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Linq.Expressions; using System.Reactive.Linq; @@ -29,8 +28,6 @@ public ColumnarTestBase() : base(new ConfigModifier() /// See SelectTransformer.Transform and SelectTransformer.ProjectionReturningResultInstance. /// This class covers all consumers of SelectTransformer.Transform /// - [SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1008", Justification = "Reviewed.")] - [SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1009", Justification = "Reviewed.")] [TestClass] public class GeneralProjectionFallbackTests : ColumnarTestBase { @@ -61,7 +58,7 @@ public class GeneralProjectionFallbackTests : ColumnarTestBase [TestMethod, TestCategory("Gated")] public void FixedIntervalEquiJoinTemplate() => EquiJoinWorker(constantDuration: 10); - private void EquiJoinWorker(long? constantDuration = null) + private static void EquiJoinWorker(long? constantDuration = null) { var left = new[] { @@ -86,7 +83,7 @@ private void EquiJoinWorker(long? constantDuration = null) var output = new List>(); left.Join(right, (l, r) => CreateValueTuple(l, r)) .ToStreamEventObservable() - .ForEachAsync(e => output.Add(e)) + .ForEachAsync(output.Add) .Wait(); var correct = new[] @@ -100,9 +97,7 @@ private void EquiJoinWorker(long? constantDuration = null) if (constantDuration.HasValue && constantDuration.Value != StreamEvent.InfinitySyncTime) { - correct = correct - .Select(e => e.IsPunctuation ? e : StreamEvent.CreateInterval(e.StartTime, e.StartTime + constantDuration.Value, e.Payload)) - .ToArray(); + correct = [.. correct.Select(e => e.IsPunctuation ? e : StreamEvent.CreateInterval(e.StartTime, e.StartTime + constantDuration.Value, e.Payload))]; } Assert.IsTrue(correct.SequenceEqual(output)); @@ -132,7 +127,7 @@ private void GroupWorker(bool group) input .GroupAggregate(s => true, w => w.Count(), (g, c) => CreateValueTuple(g.Key, c)) .ToStreamEventObservable() - .ForEachAsync(e => output.Add(e)) + .ForEachAsync(output.Add) .Wait(); var correct = new[] @@ -144,7 +139,7 @@ private void GroupWorker(bool group) Assert.IsTrue(correct.SequenceEqual(output)); } - private void SelectWorker(bool selectMany, bool fuse) + private static void SelectWorker(bool selectMany, bool fuse) { var input = new[] { @@ -175,7 +170,7 @@ private void SelectWorker(bool selectMany, bool fuse) selectStreamable .ToStreamEventObservable() - .ForEachAsync(e => output.Add(e)) + .ForEachAsync(output.Add) .Wait(); var correct = new[] diff --git a/Sources/Test/SimpleTesting/GlobalSuppressions.cs b/Sources/Test/SimpleTesting/GlobalSuppressions.cs deleted file mode 100644 index c89b555bf..000000000 --- a/Sources/Test/SimpleTesting/GlobalSuppressions.cs +++ /dev/null @@ -1,24 +0,0 @@ -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnar.CheckpointRegressionColumnar")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnar.MaxBug0Columnar")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnar.MaxBug1Columnar")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnar.MaxBug2Columnar")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnarSmallBatch.CheckpointRegressionColumnarSmallBatch")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnarSmallBatch.MaxBug0ColumnarSmallBatch")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnarSmallBatch.MaxBug1ColumnarSmallBatch")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsColumnarSmallBatch.MaxBug2ColumnarSmallBatch")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRow.CheckpointRegressionRow")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRow.MaxBug0Row")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRow.MaxBug1Row")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRow.MaxBug2Row")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRowSmallBatch.CheckpointRegressionRowSmallBatch")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRowSmallBatch.MaxBug0RowSmallBatch")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRowSmallBatch.MaxBug1RowSmallBatch")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "", Scope = "member", Target = "~M:SimpleTesting.CheckpointRestoreTestsRowSmallBatch.MaxBug2RowSmallBatch")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1305:Field names should not use Hungarian notation", Justification = "", Scope = "member", Target = "~M:SimpleTesting.Extensions.ToEvents``1(System.Collections.Generic.IEnumerable{``0},System.Func{``0,System.Int64},System.Func{``0,System.Int64})~System.Collections.Generic.IEnumerable{Microsoft.StreamProcessing.StreamEvent{``0}}")] diff --git a/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs b/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs index ea0c22f96..ea5153be0 100644 --- a/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs +++ b/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs @@ -145,7 +145,7 @@ public void DisorderedStartEdgeTestRowDrop105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -206,7 +206,7 @@ public void DisorderedIntervalTestRowDrop105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -361,7 +361,7 @@ public void DisorderedStartEdgeTestRowDrop1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -416,7 +416,7 @@ public void DisorderedIntervalTestRowDrop1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -643,7 +643,7 @@ public void DisorderedStartEdgeTestRowDrop105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -737,7 +737,7 @@ public void DisorderedIntervalTestRowDrop105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -991,7 +991,7 @@ public void DisorderedStartEdgeTestRowDrop1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -1079,7 +1079,7 @@ public void DisorderedIntervalTestRowDrop1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -1273,7 +1273,7 @@ public void DisorderedStartEdgeTestRowThrow105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -1320,7 +1320,7 @@ public void DisorderedIntervalTestRowThrow105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -1475,7 +1475,7 @@ public void DisorderedStartEdgeTestRowThrow1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -1537,7 +1537,7 @@ public void DisorderedIntervalTestRowThrow1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -1703,7 +1703,7 @@ public void DisorderedStartEdgeTestRowThrow105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -1750,7 +1750,7 @@ public void DisorderedIntervalTestRowThrow105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -1971,7 +1971,7 @@ public void DisorderedStartEdgeTestRowThrow1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -2066,7 +2066,7 @@ public void DisorderedIntervalTestRowThrow1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -2270,7 +2270,7 @@ public void DisorderedStartEdgeTestRowAdjust105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -2332,7 +2332,7 @@ public void DisorderedIntervalTestRowAdjust105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -2491,7 +2491,7 @@ public void DisorderedStartEdgeTestRowAdjust1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -2546,7 +2546,7 @@ public void DisorderedIntervalTestRowAdjust1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -2778,7 +2778,7 @@ public void DisorderedStartEdgeTestRowAdjust105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -2873,7 +2873,7 @@ public void DisorderedIntervalTestRowAdjust105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -3131,7 +3131,7 @@ public void DisorderedStartEdgeTestRowAdjust1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -3219,7 +3219,7 @@ public void DisorderedIntervalTestRowAdjust1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -3415,7 +3415,7 @@ public void DisorderedStartEdgeTestRowSmallBatchDrop105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -3476,7 +3476,7 @@ public void DisorderedIntervalTestRowSmallBatchDrop105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -3633,7 +3633,7 @@ public void DisorderedStartEdgeTestRowSmallBatchDrop1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -3688,7 +3688,7 @@ public void DisorderedIntervalTestRowSmallBatchDrop1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -3917,7 +3917,7 @@ public void DisorderedStartEdgeTestRowSmallBatchDrop105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -4011,7 +4011,7 @@ public void DisorderedIntervalTestRowSmallBatchDrop105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -4267,7 +4267,7 @@ public void DisorderedStartEdgeTestRowSmallBatchDrop1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -4355,7 +4355,7 @@ public void DisorderedIntervalTestRowSmallBatchDrop1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -4551,7 +4551,7 @@ public void DisorderedStartEdgeTestRowSmallBatchThrow105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -4598,7 +4598,7 @@ public void DisorderedIntervalTestRowSmallBatchThrow105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -4755,7 +4755,7 @@ public void DisorderedStartEdgeTestRowSmallBatchThrow1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -4817,7 +4817,7 @@ public void DisorderedIntervalTestRowSmallBatchThrow1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -4985,7 +4985,7 @@ public void DisorderedStartEdgeTestRowSmallBatchThrow105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -5032,7 +5032,7 @@ public void DisorderedIntervalTestRowSmallBatchThrow105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -5255,7 +5255,7 @@ public void DisorderedStartEdgeTestRowSmallBatchThrow1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -5350,7 +5350,7 @@ public void DisorderedIntervalTestRowSmallBatchThrow1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -5556,7 +5556,7 @@ public void DisorderedStartEdgeTestRowSmallBatchAdjust105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -5618,7 +5618,7 @@ public void DisorderedIntervalTestRowSmallBatchAdjust105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -5779,7 +5779,7 @@ public void DisorderedStartEdgeTestRowSmallBatchAdjust1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -5834,7 +5834,7 @@ public void DisorderedIntervalTestRowSmallBatchAdjust1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -6068,7 +6068,7 @@ public void DisorderedStartEdgeTestRowSmallBatchAdjust105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -6163,7 +6163,7 @@ public void DisorderedIntervalTestRowSmallBatchAdjust105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -6423,7 +6423,7 @@ public void DisorderedStartEdgeTestRowSmallBatchAdjust1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -6511,7 +6511,7 @@ public void DisorderedIntervalTestRowSmallBatchAdjust1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -6705,7 +6705,7 @@ public void DisorderedStartEdgeTestColumnarDrop105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -6766,7 +6766,7 @@ public void DisorderedIntervalTestColumnarDrop105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -6921,7 +6921,7 @@ public void DisorderedStartEdgeTestColumnarDrop1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -6976,7 +6976,7 @@ public void DisorderedIntervalTestColumnarDrop1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -7203,7 +7203,7 @@ public void DisorderedStartEdgeTestColumnarDrop105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -7297,7 +7297,7 @@ public void DisorderedIntervalTestColumnarDrop105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -7551,7 +7551,7 @@ public void DisorderedStartEdgeTestColumnarDrop1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -7639,7 +7639,7 @@ public void DisorderedIntervalTestColumnarDrop1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -7833,7 +7833,7 @@ public void DisorderedStartEdgeTestColumnarThrow105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -7880,7 +7880,7 @@ public void DisorderedIntervalTestColumnarThrow105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -8035,7 +8035,7 @@ public void DisorderedStartEdgeTestColumnarThrow1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -8097,7 +8097,7 @@ public void DisorderedIntervalTestColumnarThrow1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -8263,7 +8263,7 @@ public void DisorderedStartEdgeTestColumnarThrow105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -8310,7 +8310,7 @@ public void DisorderedIntervalTestColumnarThrow105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -8531,7 +8531,7 @@ public void DisorderedStartEdgeTestColumnarThrow1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -8626,7 +8626,7 @@ public void DisorderedIntervalTestColumnarThrow1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -8830,7 +8830,7 @@ public void DisorderedStartEdgeTestColumnarAdjust105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -8892,7 +8892,7 @@ public void DisorderedIntervalTestColumnarAdjust105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -9051,7 +9051,7 @@ public void DisorderedStartEdgeTestColumnarAdjust1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -9106,7 +9106,7 @@ public void DisorderedIntervalTestColumnarAdjust1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -9338,7 +9338,7 @@ public void DisorderedStartEdgeTestColumnarAdjust105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -9433,7 +9433,7 @@ public void DisorderedIntervalTestColumnarAdjust105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -9691,7 +9691,7 @@ public void DisorderedStartEdgeTestColumnarAdjust1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -9779,7 +9779,7 @@ public void DisorderedIntervalTestColumnarAdjust1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -9975,7 +9975,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchDrop105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -10036,7 +10036,7 @@ public void DisorderedIntervalTestColumnarSmallBatchDrop105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -10193,7 +10193,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchDrop1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -10248,7 +10248,7 @@ public void DisorderedIntervalTestColumnarSmallBatchDrop1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -10477,7 +10477,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchDrop105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -10571,7 +10571,7 @@ public void DisorderedIntervalTestColumnarSmallBatchDrop105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -10827,7 +10827,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchDrop1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -10915,7 +10915,7 @@ public void DisorderedIntervalTestColumnarSmallBatchDrop1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -11111,7 +11111,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchThrow105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -11158,7 +11158,7 @@ public void DisorderedIntervalTestColumnarSmallBatchThrow105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -11315,7 +11315,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchThrow1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -11377,7 +11377,7 @@ public void DisorderedIntervalTestColumnarSmallBatchThrow1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -11545,7 +11545,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchThrow105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -11592,7 +11592,7 @@ public void DisorderedIntervalTestColumnarSmallBatchThrow105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -11815,7 +11815,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchThrow1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -11910,7 +11910,7 @@ public void DisorderedIntervalTestColumnarSmallBatchThrow1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -12116,7 +12116,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchAdjust105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -12178,7 +12178,7 @@ public void DisorderedIntervalTestColumnarSmallBatchAdjust105Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -12339,7 +12339,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchAdjust1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -12394,7 +12394,7 @@ public void DisorderedIntervalTestColumnarSmallBatchAdjust1020Diagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -12628,7 +12628,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchAdjust105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -12723,7 +12723,7 @@ public void DisorderedIntervalTestColumnarSmallBatchAdjust105TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -12983,7 +12983,7 @@ public void DisorderedStartEdgeTestColumnarSmallBatchAdjust1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); @@ -13071,7 +13071,7 @@ public void DisorderedIntervalTestColumnarSmallBatchAdjust1020TimeDiagnostic() var diagnosticStream = ingress.GetDroppedAdjustedEventsDiagnostic(); var outOfOrderEvents = new List>(); - diagnosticStream.Subscribe(o => outOfOrderEvents.Add(o)); + diagnosticStream.Subscribe(outOfOrderEvents.Add); var outevents = prog.ToEnumerable().ToList(); Assert.IsTrue(outevents.IsOrdered(t => t.SyncTime)); diff --git a/Sources/Test/SimpleTesting/IngressEgress/FlushPolicyTestMatrixBase.cs b/Sources/Test/SimpleTesting/IngressEgress/FlushPolicyTestMatrixBase.cs index bac4766d5..b5fbbc5d6 100644 --- a/Sources/Test/SimpleTesting/IngressEgress/FlushPolicyTestMatrixBase.cs +++ b/Sources/Test/SimpleTesting/IngressEgress/FlushPolicyTestMatrixBase.cs @@ -45,7 +45,7 @@ public void FilterTest() query = query.Where(this.FilterExpression); query = query.ClipEventDuration(IntervalLength); - var filtered = qc.RegisterOutput(query).ForEachAsync(o => OnEgress(o)); + var filtered = qc.RegisterOutput(query).ForEachAsync(OnEgress); var process = qc.Restore(); for (int i = 0; i < IngressEventCount; i++) diff --git a/Sources/Test/SimpleTesting/IngressEgress/IngressAndEgressTests.cs b/Sources/Test/SimpleTesting/IngressEgress/IngressAndEgressTests.cs index 17c35bc6b..10ef8af6c 100644 --- a/Sources/Test/SimpleTesting/IngressEgress/IngressAndEgressTests.cs +++ b/Sources/Test/SimpleTesting/IngressEgress/IngressAndEgressTests.cs @@ -28,7 +28,7 @@ public void Level1InLevel1OutTrivialRow() var input = Enumerable.Range(0, 1000).ToList(); var subject = new Subject(); var prog = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToEnumerable(); - input.ForEach(o => subject.OnNext(o)); + input.ForEach(subject.OnNext); subject.OnCompleted(); while (!prog.Completed) { } var output = prog.OrderBy(o => o); @@ -43,8 +43,8 @@ public void Level1InLevel3OutTrivialRow() var subject = new Subject(); var output = new List>(); - var outputAwait = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToStreamEventObservable().Where(o => o.IsData).ForEachAsync(o => output.Add(o)); - input.ForEach(o => subject.OnNext(o)); + var outputAwait = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToStreamEventObservable().Where(o => o.IsData).ForEachAsync(output.Add); + input.ForEach(subject.OnNext); subject.OnCompleted(); outputAwait.Wait(); @@ -999,7 +999,7 @@ public void Level1InLevel1OutTrivialRowSmallBatch() var input = Enumerable.Range(0, 1000).ToList(); var subject = new Subject(); var prog = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToEnumerable(); - input.ForEach(o => subject.OnNext(o)); + input.ForEach(subject.OnNext); subject.OnCompleted(); while (!prog.Completed) { } var output = prog.OrderBy(o => o); @@ -1014,8 +1014,8 @@ public void Level1InLevel3OutTrivialRowSmallBatch() var subject = new Subject(); var output = new List>(); - var outputAwait = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToStreamEventObservable().Where(o => o.IsData).ForEachAsync(o => output.Add(o)); - input.ForEach(o => subject.OnNext(o)); + var outputAwait = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToStreamEventObservable().Where(o => o.IsData).ForEachAsync(output.Add); + input.ForEach(subject.OnNext); subject.OnCompleted(); outputAwait.Wait(); @@ -1988,7 +1988,7 @@ public void Level1InLevel1OutTrivialColumnar() var input = Enumerable.Range(0, 1000).ToList(); var subject = new Subject(); var prog = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToEnumerable(); - input.ForEach(o => subject.OnNext(o)); + input.ForEach(subject.OnNext); subject.OnCompleted(); while (!prog.Completed) { } var output = prog.OrderBy(o => o); @@ -2003,8 +2003,8 @@ public void Level1InLevel3OutTrivialColumnar() var subject = new Subject(); var output = new List>(); - var outputAwait = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToStreamEventObservable().Where(o => o.IsData).ForEachAsync(o => output.Add(o)); - input.ForEach(o => subject.OnNext(o)); + var outputAwait = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToStreamEventObservable().Where(o => o.IsData).ForEachAsync(output.Add); + input.ForEach(subject.OnNext); subject.OnCompleted(); outputAwait.Wait(); @@ -2959,7 +2959,7 @@ public void Level1InLevel1OutTrivialColumnarSmallBatch() var input = Enumerable.Range(0, 1000).ToList(); var subject = new Subject(); var prog = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToEnumerable(); - input.ForEach(o => subject.OnNext(o)); + input.ForEach(subject.OnNext); subject.OnCompleted(); while (!prog.Completed) { } var output = prog.OrderBy(o => o); @@ -2974,8 +2974,8 @@ public void Level1InLevel3OutTrivialColumnarSmallBatch() var subject = new Subject(); var output = new List>(); - var outputAwait = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToStreamEventObservable().Where(o => o.IsData).ForEachAsync(o => output.Add(o)); - input.ForEach(o => subject.OnNext(o)); + var outputAwait = subject.ToAtemporalStreamable(TimelinePolicy.Sequence(100)).ToStreamEventObservable().Where(o => o.IsData).ForEachAsync(output.Add); + input.ForEach(subject.OnNext); subject.OnCompleted(); outputAwait.Wait(); diff --git a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs index 6b778f07d..5133559ec 100644 --- a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs +++ b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs @@ -86,7 +86,7 @@ public void LOJ1Row() (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); - var resultAsync = result.ForEachAsync(o => output.Add(o)); + var resultAsync = result.ForEachAsync(output.Add); container.Restore(null); // start the query Assert.IsTrue(output.ToArray().SequenceEqual(expected)); @@ -148,7 +148,7 @@ public void LOJ1RowSmallBatch() (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); - var resultAsync = result.ForEachAsync(o => output.Add(o)); + var resultAsync = result.ForEachAsync(output.Add); container.Restore(null); // start the query Assert.IsTrue(output.ToArray().SequenceEqual(expected)); @@ -209,7 +209,7 @@ public void LOJ1Columnar() (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); - var resultAsync = result.ForEachAsync(o => output.Add(o)); + var resultAsync = result.ForEachAsync(output.Add); container.Restore(null); // start the query Assert.IsTrue(output.ToArray().SequenceEqual(expected)); @@ -271,7 +271,7 @@ public void LOJ1ColumnarSmallBatch() (l, r) => new MyData3 { field1 = l.field1, field2 = l.field2, field3 = r.field3, field4 = r.field4 }); var result = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges).Where(e => e.IsData); - var resultAsync = result.ForEachAsync(o => output.Add(o)); + var resultAsync = result.ForEachAsync(output.Add); container.Restore(null); // start the query Assert.IsTrue(output.ToArray().SequenceEqual(expected)); diff --git a/Sources/Test/SimpleTesting/Partitioned/PartitionedIngressAndEgressTestMatrixBases.cs b/Sources/Test/SimpleTesting/Partitioned/PartitionedIngressAndEgressTestMatrixBases.cs index f67deef83..dd6913f43 100644 --- a/Sources/Test/SimpleTesting/Partitioned/PartitionedIngressAndEgressTestMatrixBases.cs +++ b/Sources/Test/SimpleTesting/Partitioned/PartitionedIngressAndEgressTestMatrixBases.cs @@ -387,10 +387,10 @@ private void ProcessInput( PartitionedFlushPolicy.None, PeriodicPunctuationPolicy.None(), this.lowWatermarkPolicy); var outOfOrderEvents = new List>(); - ingress.GetDroppedAdjustedEventsDiagnostic().Subscribe(o => outOfOrderEvents.Add(o)); + ingress.GetDroppedAdjustedEventsDiagnostic().Subscribe(outOfOrderEvents.Add); var output = new List>(); - var egress = qc.RegisterOutput(ingress).ForEachAsync(o => output.Add(o)); + var egress = qc.RegisterOutput(ingress).ForEachAsync(output.Add); var process = qc.Restore(); process.Flush(); egress.Wait(); diff --git a/Sources/Test/SimpleTesting/Partitioned/PartitionedStreamTests.cs b/Sources/Test/SimpleTesting/Partitioned/PartitionedStreamTests.cs index e1bacfe53..1baddac3d 100644 --- a/Sources/Test/SimpleTesting/Partitioned/PartitionedStreamTests.cs +++ b/Sources/Test/SimpleTesting/Partitioned/PartitionedStreamTests.cs @@ -813,7 +813,7 @@ public void PartitionedStitch() var input = qc.RegisterInput(subject); var output = new List>(); - var egress = qc.RegisterOutput(input.Stitch()).ForEachAsync(o => output.Add(o)); + var egress = qc.RegisterOutput(input.Stitch()).ForEachAsync(output.Add); var process = qc.Restore(); var payload = new[] { "c1payload", "c2payload" }; diff --git a/Sources/Test/SimpleTesting/Program.cs b/Sources/Test/SimpleTesting/Program.cs index 9ee2e4665..ca33fd94f 100644 --- a/Sources/Test/SimpleTesting/Program.cs +++ b/Sources/Test/SimpleTesting/Program.cs @@ -101,16 +101,16 @@ private static void Alpha() var s = x3.ExpressionToCSharp(); } - public static void Main(string[] args) + public static void Main() { Alpha(); var meths = typeof(int).GetMethods(); var x = new { A = 3, B = 'a' }; var y = EqualsExprForAnonymousType(x.GetType()); var z = TestEquality(Enumerable.Range(0, 5), i => new { X = i, Y = (char)('a' + i), }); - z = TestEquality(new int[] { 3, 3, 3 }, i => new { Z = i, A = (char)('a' + i), W = "abc", }); - var ii = TestHash(new int[] { 3, 3, 3 }, i => new { Z = i, A = (char)('a' + i), W = "abc", }); - ii = TestComparer(new int[] { 3, 3, 3 }, i => new { Z = i, A = (char)('a' + i), W = "abc" }); + z = TestEquality([3, 3, 3], i => new { Z = i, A = (char)('a' + i), W = "abc", }); + var ii = TestHash([3, 3, 3], i => new { Z = i, A = (char)('a' + i), W = "abc", }); + ii = TestComparer([3, 3, 3], i => new { Z = i, A = (char)('a' + i), W = "abc" }); NativeMethods.AffinitizeThread(0); Config.ForceRowBasedExecution = true; diff --git a/Sources/Test/SimpleTesting/Serializer/SerializabilityTypeScan.cs b/Sources/Test/SimpleTesting/Serializer/SerializabilityTypeScan.cs index 1af3eaaed..92a410745 100644 --- a/Sources/Test/SimpleTesting/Serializer/SerializabilityTypeScan.cs +++ b/Sources/Test/SimpleTesting/Serializer/SerializabilityTypeScan.cs @@ -174,7 +174,7 @@ private static string DescribeGeneric(string name, IEnumerable args) { if (name.Contains('`')) name = name.Substring(0, name.LastIndexOf('`')); - return name + "<" + string.Join(", ", args.Select(a => DescribeType(a))) + ">"; + return name + "<" + string.Join(", ", args.Select(DescribeType)) + ">"; } private static string DescribeType(Type type) diff --git a/Sources/Test/SimpleTesting/Serializer/SurrogateTests.cs b/Sources/Test/SimpleTesting/Serializer/SurrogateTests.cs index ce2bb5b5b..463c5ab74 100644 --- a/Sources/Test/SimpleTesting/Serializer/SurrogateTests.cs +++ b/Sources/Test/SimpleTesting/Serializer/SurrogateTests.cs @@ -87,7 +87,7 @@ public void SurrogateTest() var input = new Subject>(); var ingress = qc.RegisterInput(input); - var egress = qc.RegisterOutput(ingress).ForEachAsync(o => output1.Add(o)); + var egress = qc.RegisterOutput(ingress).ForEachAsync(output1.Add); var process = qc.Restore(); input.OnNext(StreamEvent.CreatePoint(1, (IMyInterface)new MyType(1))); @@ -103,7 +103,7 @@ public void SurrogateTest() var qc2 = new QueryContainer(new MySurrogate()); var ingress2 = qc2.RegisterInput(input2); - var egress2 = qc2.RegisterOutput(ingress2).ForEachAsync(o => output2.Add(o)); + var egress2 = qc2.RegisterOutput(ingress2).ForEachAsync(output2.Add); var process2 = qc2.Restore(stream); input2.OnCompleted(); diff --git a/Sources/Test/SimpleTesting/SimpleTests.cs b/Sources/Test/SimpleTesting/SimpleTests.cs index e6ed68167..d2d6f5bfa 100644 --- a/Sources/Test/SimpleTesting/SimpleTests.cs +++ b/Sources/Test/SimpleTesting/SimpleTests.cs @@ -6453,7 +6453,7 @@ public void NaryMulticastContainer1Row() var outputObservable = container.RegisterOutput(union); // Test the output - var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); container.Restore(state); outputAsync.Wait(); @@ -8320,7 +8320,7 @@ public void NaryMulticastContainer1RowFloating() var outputObservable = container.RegisterOutput(union); // Test the output - var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); container.Restore(state); outputAsync.Wait(); @@ -10310,7 +10310,7 @@ public void NaryMulticastContainer1RowSmallBatch() var outputObservable = container.RegisterOutput(union); // Test the output - var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); container.Restore(state); outputAsync.Wait(); @@ -12178,7 +12178,7 @@ public void NaryMulticastContainer1RowSmallBatchFloating() var outputObservable = container.RegisterOutput(union); // Test the output - var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); container.Restore(state); outputAsync.Wait(); @@ -14167,7 +14167,7 @@ public void NaryMulticastContainer1Columnar() var outputObservable = container.RegisterOutput(union); // Test the output - var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); container.Restore(state); outputAsync.Wait(); @@ -16034,7 +16034,7 @@ public void NaryMulticastContainer1ColumnarFloating() var outputObservable = container.RegisterOutput(union); // Test the output - var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); container.Restore(state); outputAsync.Wait(); @@ -18024,7 +18024,7 @@ public void NaryMulticastContainer1ColumnarSmallBatch() var outputObservable = container.RegisterOutput(union); // Test the output - var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); container.Restore(state); outputAsync.Wait(); @@ -19892,7 +19892,7 @@ public void NaryMulticastContainer1ColumnarSmallBatchFloating() var outputObservable = container.RegisterOutput(union); // Test the output - var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(o => outputList.Add(o)); + var outputAsync = outputObservable.Where(e => e.IsData).Select(e => e.Payload).ForEachAsync(outputList.Add); container.Restore(state); outputAsync.Wait(); diff --git a/Sources/Test/SimpleTesting/SnapshotTests.cs b/Sources/Test/SimpleTesting/SnapshotTests.cs index 3a17792f6..221ddceb9 100644 --- a/Sources/Test/SimpleTesting/SnapshotTests.cs +++ b/Sources/Test/SimpleTesting/SnapshotTests.cs @@ -551,7 +551,7 @@ public void GroupedSessionSnapshotPunctuationsAreNotBlockedRow() applyFunc: o => o.SessionTimeoutWindow(5, 10).Sum(x => x.field1), resultSelector: (k, sum) => sum); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Punctuations preceding data events should flow through the system @@ -638,7 +638,7 @@ public void UngroupedSessionSnapshotPunctuationsAreNotBlockedRow() .SessionTimeoutWindow(5, 10) .Sum(x => x.field1); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Punctuations preceding data events should flow through the system @@ -1520,7 +1520,7 @@ public void GroupedSessionSnapshotPunctuationsAreNotBlockedRowSmallBatch() applyFunc: o => o.SessionTimeoutWindow(5, 10).Sum(x => x.field1), resultSelector: (k, sum) => sum); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Punctuations preceding data events should flow through the system @@ -1607,7 +1607,7 @@ public void UngroupedSessionSnapshotPunctuationsAreNotBlockedRowSmallBatch() .SessionTimeoutWindow(5, 10) .Sum(x => x.field1); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Punctuations preceding data events should flow through the system @@ -2488,7 +2488,7 @@ public void GroupedSessionSnapshotPunctuationsAreNotBlockedColumnar() applyFunc: o => o.SessionTimeoutWindow(5, 10).Sum(x => x.field1), resultSelector: (k, sum) => sum); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Punctuations preceding data events should flow through the system @@ -2575,7 +2575,7 @@ public void UngroupedSessionSnapshotPunctuationsAreNotBlockedColumnar() .SessionTimeoutWindow(5, 10) .Sum(x => x.field1); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Punctuations preceding data events should flow through the system @@ -3457,7 +3457,7 @@ public void GroupedSessionSnapshotPunctuationsAreNotBlockedColumnarSmallBatch() applyFunc: o => o.SessionTimeoutWindow(5, 10).Sum(x => x.field1), resultSelector: (k, sum) => sum); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Punctuations preceding data events should flow through the system @@ -3544,7 +3544,7 @@ public void UngroupedSessionSnapshotPunctuationsAreNotBlockedColumnarSmallBatch( .SessionTimeoutWindow(5, 10) .Sum(x => x.field1); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Punctuations preceding data events should flow through the system diff --git a/Sources/Test/SimpleTesting/Streamables/DisjointUnionTest.cs b/Sources/Test/SimpleTesting/Streamables/DisjointUnionTest.cs index 44ef34ec0..250b74dcc 100644 --- a/Sources/Test/SimpleTesting/Streamables/DisjointUnionTest.cs +++ b/Sources/Test/SimpleTesting/Streamables/DisjointUnionTest.cs @@ -22,7 +22,7 @@ public void DisjointUnionPunctuations() var actualOutput = new List>(); var union = new MultiUnionStreamable(new IStreamable[] { leftInput, rightInput }, guaranteedDisjoint: true); - var egress = qc.RegisterOutput(union).ForEachAsync(o => actualOutput.Add(o)); + var egress = qc.RegisterOutput(union).ForEachAsync(actualOutput.Add); var process = qc.Restore(); left.OnNext(StreamEvent.CreatePoint(100, 1)); @@ -70,7 +70,7 @@ public void DisjointUnionLowWatermarks() var actualOutput = new List>(); var inputs = new IStreamable, int>[] { leftInput, rightInput }; var union = new MultiUnionStreamable, int>(inputs, guaranteedDisjoint: true); - var egress = qc.RegisterOutput(union).ForEachAsync(o => actualOutput.Add(o)); + var egress = qc.RegisterOutput(union).ForEachAsync(actualOutput.Add); var process = qc.Restore(); left.OnNext(PartitionedStreamEvent.CreatePoint(leftKey, 100, 1)); @@ -118,7 +118,7 @@ public void DisjointUnionNegativeWatermarkRepro() var actualOutput = new List>(); var inputs = new IStreamable, int>[] { leftInput, rightInput }; var union = new MultiUnionStreamable, int>(inputs, guaranteedDisjoint: true); - var egress = qc.RegisterOutput(union).ForEachAsync(o => actualOutput.Add(o)); + var egress = qc.RegisterOutput(union).ForEachAsync(actualOutput.Add); var process = qc.Restore(); left.OnNext(PartitionedStreamEvent.CreatePoint(leftKey, 100, 1)); diff --git a/Sources/Test/SimpleTesting/Streamables/EquiJoinStreamableTest.cs b/Sources/Test/SimpleTesting/Streamables/EquiJoinStreamableTest.cs index eeee338b4..86daf3744 100644 --- a/Sources/Test/SimpleTesting/Streamables/EquiJoinStreamableTest.cs +++ b/Sources/Test/SimpleTesting/Streamables/EquiJoinStreamableTest.cs @@ -124,7 +124,7 @@ private static void JoinPointsTest(bool fixedInterval = false) (l, r) => $"{l},{r}"); var output = new List>(); - qc.RegisterOutput(query).ForEachAsync(o => output.Add(o)); + qc.RegisterOutput(query).ForEachAsync(output.Add); var process = qc.Restore(); // Should match and egress immediately @@ -284,7 +284,7 @@ private static void PartitionedStartEdgeJoinTest() r => (r != null ? r[0].ToString() : null), (l, r) => $"{l},{r}") .ToStreamEventObservable() - .ForEachAsync(e => output.Add(e)) + .ForEachAsync(output.Add) .Wait(); var correct = new PartitionedStreamEvent[] diff --git a/Sources/Test/SimpleTesting/Streamables/ExtendLifetimeTest.cs b/Sources/Test/SimpleTesting/Streamables/ExtendLifetimeTest.cs index f01e3c809..3e0827747 100644 --- a/Sources/Test/SimpleTesting/Streamables/ExtendLifetimeTest.cs +++ b/Sources/Test/SimpleTesting/Streamables/ExtendLifetimeTest.cs @@ -58,7 +58,7 @@ public void ExtendTest1() var output = container.RegisterOutput(outputStream); var result = new List>(); - output.Subscribe(t => result.Add(t)); + output.Subscribe(result.Add); container.Restore(null); diff --git a/Sources/Test/SimpleTesting/Streamables/JoinTests.cs b/Sources/Test/SimpleTesting/Streamables/JoinTests.cs index f56f18223..73f8cfbb7 100644 --- a/Sources/Test/SimpleTesting/Streamables/JoinTests.cs +++ b/Sources/Test/SimpleTesting/Streamables/JoinTests.cs @@ -118,12 +118,12 @@ public void StartEdgeEquiJoin1RowMultiString() var query = input1.Join(input2, e => e.field1, e => e, (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -161,12 +161,12 @@ public void StartEdgeEquiJoin2RowMultiString() var query = input1.Join(input2, e => e.field1, e => e.field1, (l, r) => new GameData() { EventType = l.field1, GameId = (int)r.field2, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -230,12 +230,12 @@ public void FixedIntervalEquiJoin1RowMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -273,12 +273,12 @@ public void FixedIntervalEquiJoin2RowMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -316,12 +316,12 @@ public void FixedIntervalEquiJoin3RowMultiString() var query = input1.Join(input2, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -359,12 +359,12 @@ public void FixedIntervalEquiJoin4RowMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -481,12 +481,12 @@ public void StartEdgeEquiJoin1RowRegularString() var query = input1.Join(input2, e => e.field1, e => e, (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -524,12 +524,12 @@ public void StartEdgeEquiJoin2RowRegularString() var query = input1.Join(input2, e => e.field1, e => e.field1, (l, r) => new GameData() { EventType = l.field1, GameId = (int)r.field2, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -593,12 +593,12 @@ public void FixedIntervalEquiJoin1RowRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -636,12 +636,12 @@ public void FixedIntervalEquiJoin2RowRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -679,12 +679,12 @@ public void FixedIntervalEquiJoin3RowRegularString() var query = input1.Join(input2, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -722,12 +722,12 @@ public void FixedIntervalEquiJoin4RowRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -845,12 +845,12 @@ public void StartEdgeEquiJoin1RowSmallBatchMultiString() var query = input1.Join(input2, e => e.field1, e => e, (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -888,12 +888,12 @@ public void StartEdgeEquiJoin2RowSmallBatchMultiString() var query = input1.Join(input2, e => e.field1, e => e.field1, (l, r) => new GameData() { EventType = l.field1, GameId = (int)r.field2, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -957,12 +957,12 @@ public void FixedIntervalEquiJoin1RowSmallBatchMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1000,12 +1000,12 @@ public void FixedIntervalEquiJoin2RowSmallBatchMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1043,12 +1043,12 @@ public void FixedIntervalEquiJoin3RowSmallBatchMultiString() var query = input1.Join(input2, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1086,12 +1086,12 @@ public void FixedIntervalEquiJoin4RowSmallBatchMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1209,12 +1209,12 @@ public void StartEdgeEquiJoin1RowSmallBatchRegularString() var query = input1.Join(input2, e => e.field1, e => e, (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1252,12 +1252,12 @@ public void StartEdgeEquiJoin2RowSmallBatchRegularString() var query = input1.Join(input2, e => e.field1, e => e.field1, (l, r) => new GameData() { EventType = l.field1, GameId = (int)r.field2, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1321,12 +1321,12 @@ public void FixedIntervalEquiJoin1RowSmallBatchRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1364,12 +1364,12 @@ public void FixedIntervalEquiJoin2RowSmallBatchRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1407,12 +1407,12 @@ public void FixedIntervalEquiJoin3RowSmallBatchRegularString() var query = input1.Join(input2, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1450,12 +1450,12 @@ public void FixedIntervalEquiJoin4RowSmallBatchRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1572,12 +1572,12 @@ public void StartEdgeEquiJoin1ColumnarMultiString() var query = input1.Join(input2, e => e.field1, e => e, (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1615,12 +1615,12 @@ public void StartEdgeEquiJoin2ColumnarMultiString() var query = input1.Join(input2, e => e.field1, e => e.field1, (l, r) => new GameData() { EventType = l.field1, GameId = (int)r.field2, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1684,12 +1684,12 @@ public void FixedIntervalEquiJoin1ColumnarMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1727,12 +1727,12 @@ public void FixedIntervalEquiJoin2ColumnarMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1770,12 +1770,12 @@ public void FixedIntervalEquiJoin3ColumnarMultiString() var query = input1.Join(input2, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1813,12 +1813,12 @@ public void FixedIntervalEquiJoin4ColumnarMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1935,12 +1935,12 @@ public void StartEdgeEquiJoin1ColumnarRegularString() var query = input1.Join(input2, e => e.field1, e => e, (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -1978,12 +1978,12 @@ public void StartEdgeEquiJoin2ColumnarRegularString() var query = input1.Join(input2, e => e.field1, e => e.field1, (l, r) => new GameData() { EventType = l.field1, GameId = (int)r.field2, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2047,12 +2047,12 @@ public void FixedIntervalEquiJoin1ColumnarRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2090,12 +2090,12 @@ public void FixedIntervalEquiJoin2ColumnarRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2133,12 +2133,12 @@ public void FixedIntervalEquiJoin3ColumnarRegularString() var query = input1.Join(input2, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2176,12 +2176,12 @@ public void FixedIntervalEquiJoin4ColumnarRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2299,12 +2299,12 @@ public void StartEdgeEquiJoin1ColumnarSmallBatchMultiString() var query = input1.Join(input2, e => e.field1, e => e, (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2342,12 +2342,12 @@ public void StartEdgeEquiJoin2ColumnarSmallBatchMultiString() var query = input1.Join(input2, e => e.field1, e => e.field1, (l, r) => new GameData() { EventType = l.field1, GameId = (int)r.field2, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2411,12 +2411,12 @@ public void FixedIntervalEquiJoin1ColumnarSmallBatchMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2454,12 +2454,12 @@ public void FixedIntervalEquiJoin2ColumnarSmallBatchMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2497,12 +2497,12 @@ public void FixedIntervalEquiJoin3ColumnarSmallBatchMultiString() var query = input1.Join(input2, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2540,12 +2540,12 @@ public void FixedIntervalEquiJoin4ColumnarSmallBatchMultiString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2663,12 +2663,12 @@ public void StartEdgeEquiJoin1ColumnarSmallBatchRegularString() var query = input1.Join(input2, e => e.field1, e => e, (l, r) => new GameData() { EventType = l.field1, GameId = r, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2706,12 +2706,12 @@ public void StartEdgeEquiJoin2ColumnarSmallBatchRegularString() var query = input1.Join(input2, e => e.field1, e => e.field1, (l, r) => new GameData() { EventType = l.field1, GameId = (int)r.field2, }); var output = container.RegisterAtemporalOutput(query); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2775,12 +2775,12 @@ public void FixedIntervalEquiJoin1ColumnarSmallBatchRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2818,12 +2818,12 @@ public void FixedIntervalEquiJoin2ColumnarSmallBatchRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2861,12 +2861,12 @@ public void FixedIntervalEquiJoin3ColumnarSmallBatchRegularString() var query = input1.Join(input2, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. @@ -2904,12 +2904,12 @@ public void FixedIntervalEquiJoin4ColumnarSmallBatchRegularString() var query = input1.Join(input2, e => e, e => e, (l, r) => l); var output = container.RegisterOutput(query, ReshapingPolicy.CoalesceEndEdges); - var resultAsync = output.ForEachAsync(o => result.Add(o)); + var resultAsync = output.ForEachAsync(result.Add); container.Restore(null); // start the query - var i1async = data1.ForEachAsync(e => d1Subject.OnNext(e)); // send data - var i2async = data2.ForEachAsync(e => d2Subject.OnNext(e)); // send data + var i1async = data1.ForEachAsync(d1Subject.OnNext); // send data + var i2async = data2.ForEachAsync(d2Subject.OnNext); // send data Task.WaitAll(i1async, i2async); // wait for data to be processed. diff --git a/Sources/Test/SimpleTesting/Streamables/PointAtEndTest.cs b/Sources/Test/SimpleTesting/Streamables/PointAtEndTest.cs index 8337ba718..efc756f26 100644 --- a/Sources/Test/SimpleTesting/Streamables/PointAtEndTest.cs +++ b/Sources/Test/SimpleTesting/Streamables/PointAtEndTest.cs @@ -81,7 +81,7 @@ public void PointAtEndTest2() var output = container.RegisterOutput(outputStream); var result = new List>(); - output.Subscribe(t => result.Add(t)); + output.Subscribe(result.Add); container.Restore(null); Assert.IsTrue(result.SequenceEqual(compareTo)); diff --git a/Sources/Test/TrillPerf/PerformanceTesting.csproj b/Sources/Test/TrillPerf/PerformanceTesting.csproj index 5268654f5..1962d2987 100644 --- a/Sources/Test/TrillPerf/PerformanceTesting.csproj +++ b/Sources/Test/TrillPerf/PerformanceTesting.csproj @@ -12,13 +12,6 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - true From 3f55305b85f69c994547b588e7930f252fcd74eb Mon Sep 17 00:00:00 2001 From: Amir Burbea Date: Fri, 27 Mar 2026 10:33:11 -0700 Subject: [PATCH 11/11] Remove unused references to Newtonsoft.Json --- Sources/Test/SimpleTesting/SimpleTesting.csproj | 1 - Sources/Test/TrillPerf/PerformanceTesting.csproj | 1 - 2 files changed, 2 deletions(-) diff --git a/Sources/Test/SimpleTesting/SimpleTesting.csproj b/Sources/Test/SimpleTesting/SimpleTesting.csproj index 8cf918975..a41af72f3 100644 --- a/Sources/Test/SimpleTesting/SimpleTesting.csproj +++ b/Sources/Test/SimpleTesting/SimpleTesting.csproj @@ -11,7 +11,6 @@ -