Commit 1a5c6bef authored by Nick Craver's avatar Nick Craver

Add SyncTimeout detault test + cleanup

parent 2827e060
......@@ -108,7 +108,6 @@ public void CreateDisconnectedNonsenseConnection_DNS()
[Fact]
public void SslProtocols_SingleValue()
{
var log = new StringWriter();
var options = ConfigurationOptions.Parse("myhost,sslProtocols=Tls11");
Assert.Equal(SslProtocols.Tls11, options.SslProtocols.Value);
}
......@@ -116,7 +115,6 @@ public void SslProtocols_SingleValue()
[Fact]
public void SslProtocols_MultipleValues()
{
var log = new StringWriter();
var options = ConfigurationOptions.Parse("myhost,sslProtocols=Tls11|Tls12");
Assert.Equal(SslProtocols.Tls11 | SslProtocols.Tls12, options.SslProtocols.Value);
}
......@@ -124,8 +122,6 @@ public void SslProtocols_MultipleValues()
[Fact]
public void SslProtocols_UsingIntegerValue()
{
var log = new StringWriter();
// The below scenario is for cases where the *targeted*
// .NET framework version (e.g. .NET 4.0) doesn't define an enum value (e.g. Tls11)
// but the OS has been patched with support
......@@ -137,7 +133,6 @@ public void SslProtocols_UsingIntegerValue()
[Fact]
public void SslProtocols_InvalidValue()
{
var log = new StringWriter();
Assert.Throws<ArgumentOutOfRangeException>(() => ConfigurationOptions.Parse("myhost,sslProtocols=InvalidSslProtocol"));
}
......@@ -197,5 +192,16 @@ public void ConfigurationOptionsDefaultWhenNoEndpointsSpecifiedYet()
Assert.True(options.DefaultVersion.Equals(new Version(2, 0, 0)));
Assert.True(options.AbortOnConnectFail);
}
[Fact]
public void ConfigurationOptionsSyncTimeout()
{
// Default check
var options = new ConfigurationOptions();
Assert.Equal(5000, options.SyncTimeout);
options = ConfigurationOptions.Parse("syncTimeout=20");
Assert.Equal(20, options.SyncTimeout);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment