Skip to content

Commit

Permalink
Fix socket test
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-c-martin committed Feb 3, 2022
1 parent 447c442 commit 96503d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Bicep.LangServer.IntegrationTests/InputOutputTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public async Task ServerProcess_e2e_test_with_named_pipes_io()
param foo string = 123 // trigger a type error
";

var pipeName = $"mrPipey-{Guid.NewGuid()}";
var pipeName = Guid.NewGuid().ToString();
using var pipeStream = new NamedPipeServerStream(pipeName, PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
using var process = StartServerProcessWithNamedPipeIo(pipeName);
try
Expand Down Expand Up @@ -223,7 +223,7 @@ public async Task ServerProcess_e2e_test_with_socket_io()
param foo string = 123 // trigger a type error
";

var tcpListener = new TcpListener(IPAddress.Any, 0);
var tcpListener = new TcpListener(IPAddress.Loopback, 0);
tcpListener.Start();
var tcpPort = (tcpListener.LocalEndpoint as IPEndPoint)!.Port;

Expand Down
2 changes: 1 addition & 1 deletion src/Bicep.LangServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class CommandLineOptions
public string? Pipe { get; set; }

[Option("socket", Required = false, HelpText = "The TCP port to connect to for LSP communication")]
public short? Socket { get; set; }
public int? Socket { get; set; }

[Option("stdio", Required = false, HelpText = "If set, use stdin/stdout for LSP communication")]
public bool Stdio { get; set; }
Expand Down

0 comments on commit 96503d7

Please sign in to comment.