From 3f5d91ca98126a027ad83455c4a5baab0bb1a295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 28 Oct 2024 19:20:45 +0100 Subject: [PATCH] [Exporter.Geneva] stress nullable (#2255) --- test/OpenTelemetry.Exporter.Geneva.Stress/DummyServer.cs | 2 +- .../OpenTelemetry.Exporter.Geneva.Stress.csproj | 1 - test/OpenTelemetry.Exporter.Geneva.Stress/Program.cs | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test/OpenTelemetry.Exporter.Geneva.Stress/DummyServer.cs b/test/OpenTelemetry.Exporter.Geneva.Stress/DummyServer.cs index 675b26b9b1..c6cdb17609 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Stress/DummyServer.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Stress/DummyServer.cs @@ -33,7 +33,7 @@ public void Start() this.serverSocket.Bind(this.endpoint); this.serverSocket.Listen(20); - Console.CancelKeyPress += (object sender, ConsoleCancelEventArgs args) => + Console.CancelKeyPress += (object? sender, ConsoleCancelEventArgs args) => { Console.WriteLine("Program is terminating."); this.serverSocket.Close(); diff --git a/test/OpenTelemetry.Exporter.Geneva.Stress/OpenTelemetry.Exporter.Geneva.Stress.csproj b/test/OpenTelemetry.Exporter.Geneva.Stress/OpenTelemetry.Exporter.Geneva.Stress.csproj index e307744bc8..435acd8b5d 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Stress/OpenTelemetry.Exporter.Geneva.Stress.csproj +++ b/test/OpenTelemetry.Exporter.Geneva.Stress/OpenTelemetry.Exporter.Geneva.Stress.csproj @@ -6,7 +6,6 @@ $(TargetFrameworks);net48;net472;net471;net47;net462 Exe $(NoWarn);SA1308;SA1201 - disable diff --git a/test/OpenTelemetry.Exporter.Geneva.Stress/Program.cs b/test/OpenTelemetry.Exporter.Geneva.Stress/Program.cs index 1a6c97297d..71877c8c94 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Stress/Program.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Stress/Program.cs @@ -39,14 +39,14 @@ private class WindowsOptions private class LinuxOptions { [Option('p', "path", Default = "/var/run/default_fluent.socket", HelpText = "Specify a path for Unix domain socket.")] - public string Path { get; set; } + public string? Path { get; set; } } [Verb("server", HelpText = "Start a dummy server on Linux.")] private class ServerOptions { [Option('p', "path", HelpText = "Specify a path for Unix domain socket.", Required = true)] - public string Path { get; set; } + public string? Path { get; set; } } [Verb("ExporterCreation", HelpText = "Validate exporter dispose behavior")] @@ -78,12 +78,12 @@ private static int RunExporterCreation() private static int RunLinux(LinuxOptions options) { - return EntryPoint(() => InitTracesOnLinux(options.Path), RunTraces); + return EntryPoint(() => InitTracesOnLinux(options.Path!), RunTraces); } private static int RunServer(ServerOptions options) { - var server = new DummyServer(options.Path); + var server = new DummyServer(options.Path!); server.Start(); return 0; }