From 49aab9a2ccb0c1821818271769ef914e6f3e30de Mon Sep 17 00:00:00 2001 From: Jeromy Date: Tue, 13 Sep 2016 13:20:26 -0700 Subject: [PATCH] fix go vet issues and add go vet to CI scripts --- .travis.yml | 3 ++- dht_test.go | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ddc7f4a5567..8a922b3c594 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ install: true script: - make deps + - go vet - go test ./... cache: @@ -18,4 +19,4 @@ cache: - $GOPATH/src/gx notifications: - email: false \ No newline at end of file + email: false diff --git a/dht_test.go b/dht_test.go index 7aca15f98e6..afed91ea337 100644 --- a/dht_test.go +++ b/dht_test.go @@ -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) @@ -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 { @@ -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 { @@ -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 @@ -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)