Skip to content

Commit

Permalink
Merge pull request ipfs#8 from libp2p/feat/go-vet
Browse files Browse the repository at this point in the history
fix go vet issues and add go vet to CI scripts
  • Loading branch information
whyrusleeping committed Sep 13, 2016
2 parents 02dc940 + 49aab9a commit d323f32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ install: true

script:
- make deps
- go vet
- go test ./...

cache:
directories:
- $GOPATH/src/gx

notifications:
email: false
email: false
10 changes: 5 additions & 5 deletions dht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func TestBootstrap(t *testing.T) {
stop := make(chan struct{})
go func() {
for {
t.Logf("bootstrapping them so they find each other", nDHTs)
t.Logf("bootstrapping them so they find each other %d", nDHTs)
ctxT, _ := context.WithTimeout(ctx, 5*time.Second)
bootstrap(t, ctxT, dhts)

Expand Down Expand Up @@ -392,7 +392,7 @@ func TestPeriodicBootstrap(t *testing.T) {
}
go amplify(signal, allSignals)

t.Logf("dhts are not connected.", nDHTs)
t.Logf("dhts are not connected. %d", nDHTs)
for _, dht := range dhts {
rtlen := dht.routingTable.Size()
if rtlen > 0 {
Expand All @@ -404,7 +404,7 @@ func TestPeriodicBootstrap(t *testing.T) {
connect(t, ctx, dhts[i], dhts[(i+1)%len(dhts)])
}

t.Logf("DHTs are now connected to 1-2 others.", nDHTs)
t.Logf("DHTs are now connected to 1-2 others. %d", nDHTs)
for _, dht := range dhts {
rtlen := dht.routingTable.Size()
if rtlen > 2 {
Expand All @@ -416,7 +416,7 @@ func TestPeriodicBootstrap(t *testing.T) {
printRoutingTables(dhts)
}

t.Logf("bootstrapping them so they find each other", nDHTs)
t.Logf("bootstrapping them so they find each other. %d", nDHTs)
signal <- time.Now()

// this is async, and we dont know when it's finished with one cycle, so keep checking
Expand Down Expand Up @@ -448,7 +448,7 @@ func TestProvidesMany(t *testing.T) {
}

<-time.After(100 * time.Millisecond)
t.Logf("bootstrapping them so they find each other", nDHTs)
t.Logf("bootstrapping them so they find each other. %d", nDHTs)
ctxT, _ := context.WithTimeout(ctx, 20*time.Second)
bootstrap(t, ctxT, dhts)

Expand Down

0 comments on commit d323f32

Please sign in to comment.