diff --git a/.travis.yml b/.travis.yml index fc5fa86e..9363f09a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,21 @@ language: go go: -- 1.6.4 -- 1.7.6 -- 1.8.3 +- 1.6.x +- 1.7.x +- 1.8.x install: - go get github.com/nats-io/go-nats - go get github.com/mattn/goveralls - go get github.com/wadey/gocovmerge -- go get -u honnef.co/go/tools/cmd/staticcheck -- go get -u honnef.co/go/tools/cmd/gosimple +- go get -u honnef.co/go/tools/cmd/megacheck - go get -u github.com/client9/misspell/cmd/misspell before_script: - EXCLUDE_VENDOR=$(go list ./... | grep -v "/vendor/") - go build - $(exit $(go fmt $EXCLUDE_VENDOR | wc -l)) - go vet $EXCLUDE_VENDOR -- gosimple $EXCLUDE_VENDOR - misspell -error -locale US . -- staticcheck $EXCLUDE_VENDOR +- megacheck $EXCLUDE_VENDOR - if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]]; then ./scripts/cross_compile.sh $TRAVIS_TAG; fi script: - go test -i -race $EXCLUDE_VENDOR diff --git a/server/client.go b/server/client.go index bf2908cf..8c2905b7 100644 --- a/server/client.go +++ b/server/client.go @@ -91,7 +91,6 @@ type client struct { mu sync.Mutex typ int cid uint64 - lang string opts clientOpts start time.Time nc net.Conn diff --git a/server/route.go b/server/route.go index 654adfd3..a10f1fcf 100644 --- a/server/route.go +++ b/server/route.go @@ -449,7 +449,6 @@ func (s *Server) createRoute(conn net.Conn, rURL *url.URL) *client { const ( _CRLF_ = "\r\n" _EMPTY_ = "" - _SPC_ = " " ) const ( diff --git a/server/server.go b/server/server.go index fe13b178..19853db2 100644 --- a/server/server.go +++ b/server/server.go @@ -47,7 +47,6 @@ type Info struct { // Server is our main struct. type Server struct { gcid uint64 - grid uint64 stats mu sync.Mutex info Info diff --git a/server/sublist_test.go b/server/sublist_test.go index f9d25537..5ad3b558 100644 --- a/server/sublist_test.go +++ b/server/sublist_test.go @@ -6,7 +6,6 @@ import ( "strings" "sync" "testing" - "time" dbg "runtime/debug" ) @@ -424,7 +423,6 @@ func TestSublistTwoTokenPubMatchSingleTokenSub(t *testing.T) { var subs []*subscription var toks = []string{"apcera", "continuum", "component", "router", "api", "imgr", "jmgr", "auth"} var sl = NewSublist() -var results = make([]*subscription, 0, 64) func init() { subs = make([]*subscription, 0, 256*1024) @@ -536,13 +534,3 @@ func Benchmark_____________Sublist10XMultipleReads(b *testing.B) { func Benchmark____________Sublist100XMultipleReads(b *testing.B) { multiRead(b, 100) } - -func _BenchmarkRSS(b *testing.B) { - runtime.GC() - var m runtime.MemStats - runtime.ReadMemStats(&m) - println("HEAP:", m.HeapObjects) - println("ALLOC:", m.Alloc) - println("TOTAL ALLOC:", m.TotalAlloc) - time.Sleep(30 * 1e9) -} diff --git a/test/test.go b/test/test.go index c927119a..5268ac7d 100644 --- a/test/test.go +++ b/test/test.go @@ -9,7 +9,6 @@ import ( "fmt" "io" "net" - "os/exec" "regexp" "runtime" "strings" @@ -18,13 +17,6 @@ import ( "github.com/nats-io/gnatsd/server" ) -const natsServerExe = "../gnatsd" - -type natsServer struct { - args []string - cmd *exec.Cmd -} - // So we can pass tests and benchmarks.. type tLogger interface { Fatalf(format string, args ...interface{})