Skip to content

Commit

Permalink
Fix reconnect test for environment with 1 cpu (#29)
Browse files Browse the repository at this point in the history
* Added go mod.
* Set os in travis config.
* Updated wabbit version to fixed.
* Fix reconnect tests for environments with 1 cpu.
* Fix travis config for old go versions.
  • Loading branch information
cheshir authored Apr 11, 2020
1 parent 550eff6 commit ca0c92f
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 94 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
os: linux
dist: trusty
language: go

services:
Expand All @@ -7,9 +9,13 @@ go:
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- tip

script:
- go get ./...
- gofmt -d -s .
- go vet *.go
- go test -v -race -mock-broker=1 # Run tests with real broker.
Expand Down
11 changes: 11 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module github.com/cheshir/go-mq

go 1.14

require (
github.com/NeowayLabs/wabbit v0.0.0-20200409220312-12e68ab5b0c6
github.com/google/uuid v1.1.1 // indirect
github.com/pborman/uuid v1.2.0 // indirect
github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0
)
1 change: 0 additions & 1 deletion mq.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ func (mq *mq) errorHandler() {
}

func (mq *mq) processError(err error) {
println("got error: " + err.Error())
switch err.(type) {
case *net.OpError:
go mq.reconnect()
Expand Down
Loading

0 comments on commit ca0c92f

Please sign in to comment.