Skip to content

Commit

Permalink
[Exporter.Geneva] stress nullable (#2255)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek authored Oct 28, 2024
1 parent c09a331 commit 3f5d91c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/OpenTelemetry.Exporter.Geneva.Stress/DummyServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net48;net472;net471;net47;net462</TargetFrameworks>
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);SA1308;SA1201</NoWarn>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions test/OpenTelemetry.Exporter.Geneva.Stress/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 3f5d91c

Please sign in to comment.