Add SocketError.AddressAlreadyInUse test
MODIFY
WalletWasabi.Tests/UnitTests/Clients/SingleInstanceCheckerTests.cs
WalletWasabi.Tests/UnitTests/Clients/SingleInstanceCheckerTests.cs
@@ -3,6 +3,7 @@ using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
+using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -58,6 +59,17 @@ namespace WalletWasabi.Tests.UnitTests.Clients
}
}
+ [Fact]
+ public void SocketErrorAddressAlreadyInUseTest()
+ {
+ var errorCode = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? 98
+ : RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? 48
+ : RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 10048
+ : -1;
+
+ Assert.Equal((int)SocketError.AddressAlreadyInUse, errorCode);
+ }
+
[Fact]
public async Task OtherInstanceStartedTestsAsync()
{

Add SocketError.AddressAlreadyInUse test