mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 14:28:25 +08:00
Revert UnitTest IP address to 127.0.0.1.
Seems there are sometimes performance regressions when using localhost. Might be related to IPv6, who know. Fix some TestContext not being public.
This commit is contained in:
@@ -13,7 +13,7 @@ namespace S7.Net.UnitTest
|
||||
[TestClass]
|
||||
public class ProtocolUnitTest
|
||||
{
|
||||
private TestContext TestContext { get; set; }
|
||||
public TestContext TestContext { get; set; }
|
||||
|
||||
[TestMethod]
|
||||
public async Task TPKT_Read()
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace S7.Net.UnitTest
|
||||
const int DB2 = 2;
|
||||
const int DB4 = 4;
|
||||
const short TestServerPort = 31122;
|
||||
const string TestServerIp = "127.0.0.1";
|
||||
#endregion
|
||||
|
||||
#region Private fields
|
||||
@@ -56,7 +57,7 @@ namespace S7.Net.UnitTest
|
||||
|
||||
private static Plc CreatePlc()
|
||||
{
|
||||
return new Plc(CpuType.S7300, "localhost", TestServerPort, 0, 2);
|
||||
return new Plc(CpuType.S7300, TestServerIp, TestServerPort, 0, 2);
|
||||
}
|
||||
|
||||
[TestInitialize]
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace S7.Net.UnitTest
|
||||
[TestClass]
|
||||
public class StreamTests
|
||||
{
|
||||
private TestContext TestContext { get; set; }
|
||||
public TestContext TestContext { get; set; }
|
||||
|
||||
[TestMethod]
|
||||
public async Task TPKT_ReadRestrictedStreamAsync()
|
||||
|
||||
Reference in New Issue
Block a user