Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
81aa67e5
Commit
81aa67e5
authored
Jun 03, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: more cleanup
parent
70d38a60
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
Expiry.cs
StackExchange.Redis.Tests/Expiry.cs
+1
-8
FloatingPoint.cs
StackExchange.Redis.Tests/FloatingPoint.cs
+2
-2
Sentinel.cs
StackExchange.Redis.Tests/Sentinel.cs
+4
-1
No files found.
StackExchange.Redis.Tests/Expiry.cs
View file @
81aa67e5
...
...
@@ -8,14 +8,7 @@ public class Expiry : TestBase
{
public
Expiry
(
ITestOutputHelper
output
)
:
base
(
output
)
{
}
private
static
string
[]
GetMap
(
bool
disablePTimes
)
{
if
(
disablePTimes
)
{
return
new
[]
{
"pexpire"
,
"pexpireat"
,
"pttl"
};
}
return
null
;
}
private
static
string
[]
GetMap
(
bool
disablePTimes
)
=>
disablePTimes
?
(
new
[]
{
"pexpire"
,
"pexpireat"
,
"pttl"
})
:
null
;
[
Theory
]
[
InlineData
(
true
)]
...
...
StackExchange.Redis.Tests/FloatingPoint.cs
View file @
81aa67e5
...
...
@@ -122,7 +122,7 @@ public void HashIncrDecrFloatingPoint()
}
var
val
=
(
double
)
db
.
HashGet
(
key
,
field
);
Assert
.
True
(
Within
(
sum
,
val
,
0.0001
));
Assert
.
True
(
Within
(
sum
,
val
,
0.0001
)
,
$"
{
sum
}
not within 0.0001 of
{
val
}
"
);
}
}
...
...
StackExchange.Redis.Tests/Sentinel.cs
View file @
81aa67e5
using
System
;
using
System.Net
;
using
System.Threading
;
using
StackExchange.Redis.Tests.Helpers
;
using
Xunit
;
using
Xunit.Abstractions
;
...
...
@@ -12,11 +13,13 @@ public class Sentinel
private
ConnectionMultiplexer
Conn
{
get
;
}
private
IServer
Server
{
get
;
}
protected
TextWriterOutputHelper
Writer
{
get
;
}
public
ITestOutputHelper
Output
{
get
;
}
public
Sentinel
(
ITestOutputHelper
output
)
{
Output
=
output
;
Writer
=
new
TextWriterOutputHelper
(
output
);
Skip
.
IfNoConfig
(
nameof
(
TestConfig
.
Config
.
SentinelServer
),
TestConfig
.
Current
.
SentinelServer
);
Skip
.
IfNoConfig
(
nameof
(
TestConfig
.
Config
.
SentinelSeviceName
),
TestConfig
.
Current
.
SentinelSeviceName
);
...
...
@@ -30,7 +33,7 @@ public Sentinel(ITestOutputHelper output)
ServiceName
=
TestConfig
.
Current
.
SentinelSeviceName
,
SyncTimeout
=
5000
};
Conn
=
ConnectionMultiplexer
.
Connect
(
options
,
Console
.
Out
);
Conn
=
ConnectionMultiplexer
.
Connect
(
options
,
Writer
);
Thread
.
Sleep
(
3000
);
Assert
.
True
(
Conn
.
IsConnected
);
Server
=
Conn
.
GetServer
(
TestConfig
.
Current
.
SentinelServer
,
TestConfig
.
Current
.
SentinelPort
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment