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
d6ff296d
Commit
d6ff296d
authored
Jun 02, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: more specificity to expiration and a bit more leadway
parent
9c3eeed7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
Expiry.cs
StackExchange.Redis.Tests/Expiry.cs
+5
-6
No files found.
StackExchange.Redis.Tests/Expiry.cs
View file @
d6ff296d
...
...
@@ -81,16 +81,15 @@ public void TestBasicExpiryDateTime(bool disablePTimes, bool utc)
Assert
.
Null
(
muxer
.
Wait
(
a
));
var
time
=
muxer
.
Wait
(
b
);
Assert
.
NotNull
(
time
);
Output
.
WriteLine
(
"Time: {0}, Expected: {1}"
,
time
,
resultOffset
+
TimeSpan
.
FromMinutes
(
59
));
Assert
.
True
(
time
>
resultOffset
+
TimeSpan
.
FromMinutes
(
59
)
&&
time
<=
resultOffset
+
TimeSpan
.
FromMinutes
(
60
));
Output
.
WriteLine
(
"Time: {0}, Expected: {1}-{2}"
,
time
,
resultOffset
+
TimeSpan
.
FromMinutes
(
58
),
resultOffset
+
TimeSpan
.
FromMinutes
(
60
));
Assert
.
True
(
time
>=
resultOffset
+
TimeSpan
.
FromMinutes
(
58
));
Assert
.
True
(
time
<=
resultOffset
+
TimeSpan
.
FromMinutes
(
60
));
Assert
.
Null
(
muxer
.
Wait
(
c
));
time
=
muxer
.
Wait
(
d
);
Assert
.
NotNull
(
time
);
Assert
.
True
(
time
>
resultOffset
+
TimeSpan
.
FromMinutes
(
89
)
&&
time
<=
resultOffset
+
TimeSpan
.
FromMinutes
(
90
));
Assert
.
True
(
time
>=
resultOffset
+
TimeSpan
.
FromMinutes
(
88
));
Assert
.
True
(
time
<=
resultOffset
+
TimeSpan
.
FromMinutes
(
90
));
Assert
.
Null
(
muxer
.
Wait
(
e
));
// Cleanup
conn
.
KeyDelete
(
key
,
CommandFlags
.
FireAndForget
);
}
}
}
...
...
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