Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-mplex
Commits
7bfef51f
Commit
7bfef51f
authored
Aug 27, 2020
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: allow slowdown when race detector is enabled
parent
81349d05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
benchmarks_test.go
benchmarks_test.go
+1
-1
norace_test.go
norace_test.go
+5
-0
race_test.go
race_test.go
+5
-0
No files found.
benchmarks_test.go
View file @
7bfef51f
...
@@ -50,7 +50,7 @@ func TestSmallPackets(t *testing.T) {
...
@@ -50,7 +50,7 @@ func TestSmallPackets(t *testing.T) {
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
}
}
if
slowdown
>
0.15
{
if
slowdown
>
0.15
&&
!
raceEnabled
{
t
.
Fatalf
(
"Slowdown from mplex was >15%%: %f"
,
slowdown
)
t
.
Fatalf
(
"Slowdown from mplex was >15%%: %f"
,
slowdown
)
}
}
}
}
...
...
norace_test.go
0 → 100644
View file @
7bfef51f
//+build !race
package
multiplex
var
raceEnabled
=
false
race_test.go
0 → 100644
View file @
7bfef51f
//+build race
package
multiplex
var
raceEnabled
=
true
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