Skip to content

Commit c0ff87b

Browse files
committed
output using ports
1 parent 2fb567a commit c0ff87b

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Wissance.Hydra/Wissance.Hydra/Wissance.Hydra.Tcp.Tests/Transport/MultiChannelTcpServerTests.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ public async Task TestCollectMultipleClientsToOneChannelServer(int clientsNumber
4747
Port = serverPort,
4848
IsSecure = false
4949
};
50+
_testOutputHelper.WriteLine($"Server port is: {serverPort}");
51+
5052
int clientsCounter = 0;
5153
int clientsConnectError = 0;
5254
int serverErrorsCounter = 0;
@@ -132,6 +134,7 @@ public async Task TestInteractWithClients(int clientsNumber)
132134
Port = serverPort,
133135
IsSecure = false
134136
};
137+
_testOutputHelper.WriteLine($"Server port is: {serverPort}");
135138

136139
ITcpServer server = new MultiChannelTcpServer(new[] { mainInsecureChannel }, new NullLoggerFactory(),
137140
null, null);
@@ -221,15 +224,16 @@ public async Task TestInteractWithClientsWithTlsProtectedChannel(int clientsNumb
221224
{
222225
Random rand = new Random((int)DateTimeOffset.Now.Ticks);
223226
int serverPort = rand.Next(17000, 25000);
224-
ServerChannelConfiguration mainInsecureChannel = new ServerChannelConfiguration()
227+
ServerChannelConfiguration mainSecureChannel = new ServerChannelConfiguration()
225228
{
226229
IpAddress = _localAddress,
227230
Port = serverPort,
228231
IsSecure = true,
229232
CertificatePath = Path.GetFullPath(TestCertificatePath)
230233
};
231-
232-
ITcpServer server = new MultiChannelTcpServer(new[] { mainInsecureChannel }, new NullLoggerFactory(),
234+
_testOutputHelper.WriteLine($"Server port is: {serverPort}");
235+
236+
ITcpServer server = new MultiChannelTcpServer(new[] { mainSecureChannel }, new NullLoggerFactory(),
233237
null, null);
234238
int clientsCounter = 0;
235239
server.AssignConnectionHandler(c =>
@@ -308,7 +312,7 @@ public async Task TestMultiChannelTcpServer(int mainChannelClientsNumber, int ad
308312
{
309313
Random rand = new Random((int)DateTimeOffset.Now.Ticks);
310314
int mainServerPort = rand.Next(17000, 25000);
311-
ServerChannelConfiguration mainInsecureChannel = new ServerChannelConfiguration()
315+
ServerChannelConfiguration mainSecureChannel = new ServerChannelConfiguration()
312316
{
313317
IpAddress = _localAddress,
314318
Port = mainServerPort,
@@ -323,7 +327,9 @@ public async Task TestMultiChannelTcpServer(int mainChannelClientsNumber, int ad
323327
IsSecure = false
324328
};
325329

326-
ITcpServer server = new MultiChannelTcpServer(new[] { mainInsecureChannel, additionalNonSecureChannel },
330+
_testOutputHelper.WriteLine($"Server port are: ({mainServerPort} , {additionalServerPort})");
331+
332+
ITcpServer server = new MultiChannelTcpServer(new[] { mainSecureChannel, additionalNonSecureChannel },
327333
new NullLoggerFactory(),
328334
null, null);
329335
int clientsCounter = 0;

0 commit comments

Comments
 (0)