Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
83e6bbf5
Commit
83e6bbf5
authored
Jan 14, 2015
by
Juan Batiz-Benet
Browse files
testing/ci: all env var checks now use new pkgs
Good thing, i checked one wrong, too!
parent
9f8999a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
net/conn/conn_test.go
View file @
83e6bbf5
...
...
@@ -3,13 +3,14 @@ package conn
import
(
"bytes"
"fmt"
"os"
"runtime"
"sync"
"testing"
"time"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
travis
"github.com/jbenet/go-ipfs/util/testutil/ci/travis"
)
func
testOneSendRecv
(
t
*
testing
.
T
,
c1
,
c2
Conn
)
{
...
...
@@ -62,7 +63,7 @@ func TestCloseLeak(t *testing.T) {
t
.
SkipNow
()
}
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
t
.
Skip
(
"this doesn't work well on travis"
)
}
...
...
net/conn/secure_conn_test.go
View file @
83e6bbf5
...
...
@@ -2,13 +2,13 @@ package conn
import
(
"bytes"
"os"
"runtime"
"sync"
"testing"
"time"
ic
"github.com/jbenet/go-ipfs/p2p/crypto"
travis
"github.com/jbenet/go-ipfs/util/testutil/ci/travis"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
)
...
...
@@ -131,7 +131,7 @@ func TestSecureCloseLeak(t *testing.T) {
if
testing
.
Short
()
{
t
.
SkipNow
()
}
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
t
.
Skip
(
"this doesn't work well on travis"
)
}
...
...
net/swarm/dial_test.go
View file @
83e6bbf5
...
...
@@ -2,14 +2,16 @@ package swarm
import
(
"net"
"os"
"sync"
"testing"
"time"
addrutil
"github.com/jbenet/go-ipfs/p2p/net/swarm/addr"
peer
"github.com/jbenet/go-ipfs/p2p/peer"
testutil
"github.com/jbenet/go-ipfs/util/testutil"
jenkins
"github.com/jbenet/go-ipfs/util/testutil/ci/jenkins"
travis
"github.com/jbenet/go-ipfs/util/testutil/ci/travis"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
ma
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
...
...
@@ -114,7 +116,7 @@ func TestDialWait(t *testing.T) {
defer
s1
.
Close
()
s1
.
dialT
=
time
.
Millisecond
*
300
// lower timeout for tests.
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
s1
.
dialT
=
time
.
Second
}
...
...
@@ -148,8 +150,8 @@ func TestDialWait(t *testing.T) {
func
TestDialBackoff
(
t
*
testing
.
T
)
{
// t.Skip("skipping for another test")
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
t
.
Skip
(
"travis will never have fun with this test"
)
if
travis
.
IsRunning
()
||
jenkins
.
IsRunning
()
{
t
.
Skip
(
"travis
and jenkins
will never have fun with this test"
)
}
t
.
Parallel
()
...
...
@@ -375,7 +377,7 @@ func TestDialBackoffClears(t *testing.T) {
defer
s2
.
Close
()
s1
.
dialT
=
time
.
Millisecond
*
300
// lower timeout for tests.
s2
.
dialT
=
time
.
Millisecond
*
300
// lower timeout for tests.
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
s1
.
dialT
=
time
.
Second
s2
.
dialT
=
time
.
Second
}
...
...
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