Skip to content

Commit

Permalink
fix server selection timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz committed Apr 27, 2021
1 parent 7254c22 commit a66a7a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ jobs:
run: go test -timeout 20m -v ./... -coverprofile=coverage.txt -covermode=atomic
env:
# MySQL
MYSQL_URI: mysql://root:password@tcp(mysql:${{ job.services.mysql.ports[3306] }})/
MYSQL_URI: mysql://root:password@tcp(localhost:${{ job.services.mysql.ports[3306] }})/
# MongoDB
MONGO_URI: mongodb://root:password@mongo:${{ job.services.mongo.ports[27017] }}/
MONGO_URI: mongodb://root:password@localhost:${{ job.services.mongo.ports[27017] }}/

- name: Upload
run: bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion storage/data/mongodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func newTestMongoDatabase(t *testing.T, dbName string) *testMongoDatabase {
err = database.Database.Close()
assert.Nil(t, err)
// create schema
database.Database, err = Open(mongoUri + dbName + "?authSource=admin")
database.Database, err = Open(mongoUri + dbName + "?authSource=admin&connect=direct")
assert.Nil(t, err)
err = database.Init()
assert.Nil(t, err)
Expand Down

0 comments on commit a66a7a8

Please sign in to comment.