From d6d1650ad0a92e2b8e3581a4f160f14bf4b61396 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 02:12:49 +0000 Subject: [PATCH 1/3] Bump Microsoft.NET.Test.Sdk and Microsoft.TestPlatform.ObjectModel Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) and [Microsoft.TestPlatform.ObjectModel](https://github.com/microsoft/vstest). These dependencies needed to be updated together. Updates `Microsoft.NET.Test.Sdk` from 17.9.0 to 17.10.0 - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.9.0...v17.10.0) Updates `Microsoft.TestPlatform.ObjectModel` from 17.9.0 to 17.10.0 - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.9.0...v17.10.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.TestPlatform.ObjectModel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../OpenSearch.OpenSearch.EphemeralTests.csproj | 2 +- .../OpenSearch.Stack.ArtifactsApiTests.csproj | 2 +- tests/Tests.Auth.AwsSigV4/Tests.Auth.AwsSigV4.csproj | 2 +- tests/Tests.Reproduce/Tests.Reproduce.csproj | 2 +- tests/Tests/Tests.csproj | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/abstractions/tests/OpenSearch.OpenSearch.EphemeralTests/OpenSearch.OpenSearch.EphemeralTests.csproj b/abstractions/tests/OpenSearch.OpenSearch.EphemeralTests/OpenSearch.OpenSearch.EphemeralTests.csproj index 220f95af66..0b7ce29705 100644 --- a/abstractions/tests/OpenSearch.OpenSearch.EphemeralTests/OpenSearch.OpenSearch.EphemeralTests.csproj +++ b/abstractions/tests/OpenSearch.OpenSearch.EphemeralTests/OpenSearch.OpenSearch.EphemeralTests.csproj @@ -8,7 +8,7 @@ - + diff --git a/abstractions/tests/OpenSearch.Stack.ArtifactsApiTests/OpenSearch.Stack.ArtifactsApiTests.csproj b/abstractions/tests/OpenSearch.Stack.ArtifactsApiTests/OpenSearch.Stack.ArtifactsApiTests.csproj index 633171dc97..95daa76b51 100644 --- a/abstractions/tests/OpenSearch.Stack.ArtifactsApiTests/OpenSearch.Stack.ArtifactsApiTests.csproj +++ b/abstractions/tests/OpenSearch.Stack.ArtifactsApiTests/OpenSearch.Stack.ArtifactsApiTests.csproj @@ -9,7 +9,7 @@ - + diff --git a/tests/Tests.Auth.AwsSigV4/Tests.Auth.AwsSigV4.csproj b/tests/Tests.Auth.AwsSigV4/Tests.Auth.AwsSigV4.csproj index 9cc33cbffa..a065d6057d 100644 --- a/tests/Tests.Auth.AwsSigV4/Tests.Auth.AwsSigV4.csproj +++ b/tests/Tests.Auth.AwsSigV4/Tests.Auth.AwsSigV4.csproj @@ -12,7 +12,7 @@ - + diff --git a/tests/Tests.Reproduce/Tests.Reproduce.csproj b/tests/Tests.Reproduce/Tests.Reproduce.csproj index d43eeca5ca..8a1229cc96 100644 --- a/tests/Tests.Reproduce/Tests.Reproduce.csproj +++ b/tests/Tests.Reproduce/Tests.Reproduce.csproj @@ -5,7 +5,7 @@ - + diff --git a/tests/Tests/Tests.csproj b/tests/Tests/Tests.csproj index 6d172b8d7c..72f18a2bcb 100644 --- a/tests/Tests/Tests.csproj +++ b/tests/Tests/Tests.csproj @@ -15,7 +15,7 @@ - + From f8a05558ba3ac5dce34263a063141c80ef44b798 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Tue, 28 May 2024 09:53:11 +1200 Subject: [PATCH 2/3] Update CHANGELOG.md Signed-off-by: Thomas Farr --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82a5bd8ea0..75c4298e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `System.Diagnostics.DiagnosticSource` from 8.0.0 to 8.0.1 - Bumps `Spectre.Console` from 0.48.0 to 0.49.1 - Bumps `Nullean.VsTest.Pretty.TestLogger` from 0.3.0 to 0.4.0 +- Bumps `Microsoft.NET.Test.Sdk` from 17.9.0 to 17.10.0 +- Bumps `Microsoft.TestPlatform.ObjectModel` from 17.9.0 to 17.10.0 ## [1.7.1] ### Fixed @@ -188,4 +190,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [1.6.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.5.0...v1.6.0 [1.5.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0 \ No newline at end of file +[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0 From 96b2403c3f367c4905af43d1e3f714c3218c45cd Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Tue, 28 May 2024 10:30:19 +1200 Subject: [PATCH 3/3] Skip GitHubIssue5363 Signed-off-by: Thomas Farr --- tests/Tests.Reproduce/GitHubIssue5363.cs | 115 ++++++++++++----------- 1 file changed, 58 insertions(+), 57 deletions(-) diff --git a/tests/Tests.Reproduce/GitHubIssue5363.cs b/tests/Tests.Reproduce/GitHubIssue5363.cs index ea9f2e5f5d..b4784a664c 100644 --- a/tests/Tests.Reproduce/GitHubIssue5363.cs +++ b/tests/Tests.Reproduce/GitHubIssue5363.cs @@ -34,64 +34,65 @@ using OpenSearch.OpenSearch.Xunit.XunitPlumbing; using OpenSearch.Net; using OpenSearch.Net.Diagnostics; +using Tests.Core.Xunit; using Xunit; -namespace Tests.Reproduce +namespace Tests.Reproduce; + +[Skip("When run in parallel with other tests the diagnostic listener may throw null pointer exceptions")] +public class GitHubIssue5363 { - public class GitHubIssue5363 - { - internal class TestDiagnosticListener : IObserver, IDisposable - { - private ConcurrentBag Disposables { get; } = new(); - - public Action OnEnded { get; } - - public TestDiagnosticListener(Action onEnded) => OnEnded = onEnded; - - public void OnError(Exception error) { } - public void OnCompleted() { } - - public void OnNext(DiagnosticListener value) => - TrySubscribe(DiagnosticSources.RequestPipeline.SourceName, - () => new RequestPipelineDiagnosticObserver(null, v => OnEnded(v.Value)), value); - - private void TrySubscribe(string sourceName, Func>> listener, DiagnosticListener value) - { - if (value.Name != sourceName) - return; - var d = value.Subscribe(listener()); - - Disposables.Add(d); - } - - public void Dispose() - { - foreach (var d in Disposables) - { - d.Dispose(); - } - } - } - - [U] - public async Task DiagnosticListener_AuditTrailIsValid() - { - using var listener = new TestDiagnosticListener(data => - { - var auditTrailEvent = data.AuditTrail[0]; - - Assert.True(auditTrailEvent.Ended != default); - }); - - using var foo = DiagnosticListener.AllListeners.Subscribe(listener); - - var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); - var settings = new ConnectionConfiguration(connectionPool, new InMemoryConnection()); - - var client = new OpenSearchLowLevelClient(settings); - var person = new { Id = "1" }; - - await client.IndexAsync("test-index", PostData.Serializable(person)); - } - } + internal class TestDiagnosticListener : IObserver, IDisposable + { + private ConcurrentBag Disposables { get; } = new(); + + public Action OnEnded { get; } + + public TestDiagnosticListener(Action onEnded) => OnEnded = onEnded; + + public void OnError(Exception error) { } + public void OnCompleted() { } + + public void OnNext(DiagnosticListener value) => + TrySubscribe(DiagnosticSources.RequestPipeline.SourceName, + () => new RequestPipelineDiagnosticObserver(null, v => OnEnded(v.Value)), value); + + private void TrySubscribe(string sourceName, Func>> listener, DiagnosticListener value) + { + if (value.Name != sourceName) + return; + var d = value.Subscribe(listener()); + + Disposables.Add(d); + } + + public void Dispose() + { + foreach (var d in Disposables) + { + d.Dispose(); + } + } + } + + [U] + public async Task DiagnosticListener_AuditTrailIsValid() + { + using var listener = new TestDiagnosticListener(data => + { + var auditTrailEvent = data.AuditTrail[0]; + + Assert.True(auditTrailEvent.Ended != default); + }); + + using var foo = DiagnosticListener.AllListeners.Subscribe(listener); + + var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); + var settings = new ConnectionConfiguration(connectionPool, new InMemoryConnection()); + + var client = new OpenSearchLowLevelClient(settings); + var person = new { Id = "1" }; + + await client.IndexAsync("test-index", PostData.Serializable(person)); + } }