Skip to content

Commit

Permalink
fix. FixUdp.OpenAndClose. (macOs | Linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed Jun 30, 2024
1 parent f909f96 commit 4a8bf98
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/udp/FixUdp.OpenAndClose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public void OpenAndClose()
Client();
Server();

async void Client()
void Client()
{
var host = HostManager.GenerateLocalHost();

Expand All @@ -29,7 +29,7 @@ async void Client()
Assert.False(isModify);
}

await client.To.Open(host);
client.To.Open(host).Wait();

Thread.Sleep(millisecondsTimeout: 100);
{
Expand All @@ -40,7 +40,7 @@ async void Client()
Assert.False(isError);
}

await client.To.Close();
client.To.Close().Wait();

Thread.Sleep(millisecondsTimeout: 300);
{
Expand All @@ -51,7 +51,7 @@ async void Client()
Assert.False(isError);
}

await client.To.Open(new Host(IPAddress.Any, 0));
client.To.Open(new Host(IPAddress.Any, 0)).Wait();
{
Assert.False(client.IsOpened);
Assert.True(isModify);
Expand All @@ -60,10 +60,10 @@ async void Client()
Assert.True(isError);
}

await client.To.Close();
client.To.Close().Wait();
}

async void Server()
void Server()
{
var host = HostManager.GenerateLocalHost();

Expand All @@ -88,7 +88,7 @@ async void Server()
Assert.False(isModify);
}

await server.To.Open(host);
server.To.Open(host).Wait();

Thread.Sleep(millisecondsTimeout: 100);
{
Expand All @@ -99,7 +99,7 @@ async void Server()
Assert.False(isError);
}

await server.To.Close();
server.To.Close().Wait();

Thread.Sleep(millisecondsTimeout: 300);
{
Expand All @@ -111,7 +111,7 @@ async void Server()
}

// Cannot assign requested address
await server.To.Open(new Host("1.1.1.1", 0));
server.To.Open(new Host("1.1.1.1", 0)).Wait();
{
Assert.False(server.IsOpened);
Assert.True(isModify);
Expand All @@ -120,7 +120,7 @@ async void Server()
Assert.True(isError);
}

await server.To.Close();
server.To.Close().Wait();
}
}
}

0 comments on commit 4a8bf98

Please sign in to comment.