Skip to content

Commit

Permalink
Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
yallie committed Jan 15, 2021
1 parent eced340 commit e41bd6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/Zyan.Tests/TcpExConnectionLockRegressionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public void CreateDisposeAndRecreateConnectionUsingTcpDuplexChannel()
{
var url = "tcpex://localhost:8092/TcpExConnectionLockRegressionTestHost_TcpDuplex";
var protocol = new TcpDuplexClientProtocolSetup(true);
var lessThanTimeout = 10;

using (var connection = new ZyanConnection(url, protocol))
{
Expand All @@ -208,7 +209,7 @@ public void CreateDisposeAndRecreateConnectionUsingTcpDuplexChannel()

try
{
// this connection should time out
// this connection should time out in more than lessThanTimeout seconds
new ZyanConnection(url.Replace("localhost", "example.com"), protocol);
}
catch (Exception ex)
Expand All @@ -223,7 +224,8 @@ public void CreateDisposeAndRecreateConnectionUsingTcpDuplexChannel()
sw.Stop();

Assert.IsTrue(badConnectionInitiated);
Assert.IsTrue(sw.Elapsed.TotalSeconds < 10);
Assert.IsTrue(sw.Elapsed.TotalSeconds < lessThanTimeout);
Trace.WriteLine("** CreateDisposeAndRecreateConnectionUsingTcpDuplexChannel test finished **");
}
}
}
Expand Down

0 comments on commit e41bd6e

Please sign in to comment.