Skip to content
This repository has been archived by the owner on Jun 28, 2018. It is now read-only.

fix mysql test #330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -17,7 +17,7 @@ services:
install:
- make deps
- (cd $GOPATH/src/github.com/docker/docker && git fetch --all --tags --prune && git checkout v17.05.0-ce)
- sudo apt-get update && sudo apt-get install docker-ce=17.05.0*
- sudo apt-get update && sudo apt-get --allow-downgrades install docker-ce=17.05.0*
- go get github.com/mattn/goveralls

script:
Expand Down
2 changes: 2 additions & 0 deletions database/mysql/mysql_test.go
Expand Up @@ -11,6 +11,7 @@ import (
// "github.com/go-sql-driver/mysql"
dt "github.com/mattes/migrate/database/testing"
mt "github.com/mattes/migrate/testing"
"time"
)

var versions = []mt.Version{
Expand Down Expand Up @@ -42,6 +43,7 @@ func Test(t *testing.T) {
func(t *testing.T, i mt.Instance) {
p := &Mysql{}
addr := fmt.Sprintf("mysql://root:root@tcp(%v:%v)/public", i.Host(), i.Port())
time.Sleep(time.Second * 15) // it seems that sometimes MySQL server is not started yet and the test fails
d, err := p.Open(addr)
if err != nil {
t.Fatalf("%v", err)
Expand Down