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
5817b3e0
Commit
5817b3e0
authored
Aug 10, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: log time on everything
parent
3c6e6821
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
PubSub.cs
StackExchange.Redis.Tests/PubSub.cs
+4
-4
TestBase.cs
StackExchange.Redis.Tests/TestBase.cs
+12
-4
No files found.
StackExchange.Redis.Tests/PubSub.cs
View file @
5817b3e0
...
...
@@ -312,7 +312,7 @@ public async Task PubSubGetAllAnyOrder()
{
data
.
Add
(
int
.
Parse
(
Encoding
.
UTF8
.
GetString
(
val
)));
pulse
=
data
.
Count
==
count
;
if
((
data
.
Count
%
100
)
==
99
)
Log
(
Time
()
+
": "
+
data
.
Count
.
ToString
());
if
((
data
.
Count
%
100
)
==
99
)
Log
(
data
.
Count
.
ToString
());
}
if
(
pulse
)
{
...
...
@@ -367,7 +367,7 @@ async Task RunLoop()
{
data
.
Add
(
i
);
if
(
data
.
Count
==
count
)
break
;
if
((
data
.
Count
%
100
)
==
99
)
Log
(
Time
()
+
": "
+
data
.
Count
.
ToString
());
if
((
data
.
Count
%
100
)
==
99
)
Log
(
data
.
Count
.
ToString
());
}
}
lock
(
syncLock
)
...
...
@@ -424,7 +424,7 @@ public async Task PubSubGetAllCorrectOrder_OnMessage_Sync()
{
data
.
Add
(
i
);
if
(
data
.
Count
==
count
)
pulse
=
true
;
if
((
data
.
Count
%
100
)
==
99
)
Log
(
Time
()
+
": "
+
data
.
Count
.
ToString
());
if
((
data
.
Count
%
100
)
==
99
)
Log
(
data
.
Count
.
ToString
());
}
if
(
pulse
)
{
...
...
@@ -484,7 +484,7 @@ public async Task PubSubGetAllCorrectOrder_OnMessage_Async()
{
data
.
Add
(
i
);
if
(
data
.
Count
==
count
)
pulse
=
true
;
if
((
data
.
Count
%
100
)
==
99
)
Log
(
Time
()
+
": "
+
data
.
Count
.
ToString
());
if
((
data
.
Count
%
100
)
==
99
)
Log
(
data
.
Count
.
ToString
());
}
if
(
pulse
)
{
...
...
StackExchange.Redis.Tests/TestBase.cs
View file @
5817b3e0
...
...
@@ -28,7 +28,7 @@ protected TestBase(ITestOutputHelper output)
ClearAmbientFailures
();
}
protected
void
Log
(
string
message
)
protected
void
Log
NoTime
(
string
message
)
{
Output
.
WriteLine
(
message
);
if
(
TestConfig
.
Current
.
LogToConsole
)
...
...
@@ -36,9 +36,17 @@ protected void Log(string message)
Console
.
WriteLine
(
message
);
}
}
protected
void
Log
(
string
message
)
{
Output
.
WriteLine
(
Time
()
+
": "
+
message
);
if
(
TestConfig
.
Current
.
LogToConsole
)
{
Console
.
WriteLine
(
message
);
}
}
protected
void
Log
(
string
message
,
params
object
[]
args
)
{
Output
.
WriteLine
(
message
,
args
);
Output
.
WriteLine
(
Time
()
+
": "
+
message
,
args
);
if
(
TestConfig
.
Current
.
LogToConsole
)
{
Console
.
WriteLine
(
message
,
args
);
...
...
@@ -146,14 +154,14 @@ public void Teardown()
{
foreach
(
var
item
in
privateExceptions
.
Take
(
5
))
{
Log
(
item
);
Log
NoTime
(
item
);
}
}
lock
(
backgroundExceptions
)
{
foreach
(
var
item
in
backgroundExceptions
.
Take
(
5
))
{
Log
(
item
);
Log
NoTime
(
item
);
}
}
Assert
.
True
(
false
,
$"There were
{
privateFailCount
}
private and
{
sharedFailCount
.
Value
}
ambient exceptions; expected
{
expectedFailCount
}
."
);
...
...
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