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
dms3
go-unixfs
Commits
5372f4c4
Commit
5372f4c4
authored
Dec 26, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #475 from jbenet/fix-ctx-frac
frac ctx - skip time tests in travis
parents
c1cd2785
5999ae8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
util/ctx/fracctx_test.go
util/ctx/fracctx_test.go
+8
-0
No files found.
util/ctx/fracctx_test.go
View file @
5372f4c4
package
ctxutil
import
(
"os"
"testing"
"time"
...
...
@@ -9,6 +10,10 @@ import (
// this test is on the context tool itself, not our stuff. it's for sanity on ours.
func
TestDeadline
(
t
*
testing
.
T
)
{
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
t
.
Skip
(
"timeouts don't work reliably on travis"
)
}
ctx
,
_
:=
context
.
WithTimeout
(
context
.
Background
(),
5
*
time
.
Millisecond
)
select
{
...
...
@@ -37,6 +42,9 @@ func TestDeadlineFractionForever(t *testing.T) {
}
func
TestDeadlineFractionHalf
(
t
*
testing
.
T
)
{
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
t
.
Skip
(
"timeouts don't work reliably on travis"
)
}
ctx1
,
_
:=
context
.
WithTimeout
(
context
.
Background
(),
10
*
time
.
Millisecond
)
ctx2
,
_
:=
WithDeadlineFraction
(
ctx1
,
0.5
)
...
...
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