hyperledger-archives / aries-framework-go

Hyperledger Aries Framework Go provides packages for building Agent / DIDComm services.
https://wiki.hyperledger.org/display/ARIES/aries-framework-go
Apache License 2.0
240 stars 161 forks source link

mysql storage: tests are not properly waiting for db readiness #2051

Closed llorllale closed 4 years ago

llorllale commented 4 years ago

https://github.com/hyperledger/aries-framework-go/blob/e4ed522212cb5a4f49eeb06f2c9e882aa389cb60/pkg/storage/mysql/mysqlstore_test.go#L37

The check performed by checkMySQL() is insufficient - it needs to also call db.Ping() and make sure it succeeds. It should also do an appropriate number of retries.

Afterwards, if checkMySQL() fails then the exit code in TestMain MUST be something other than 0.

llorllale commented 4 years ago

@talwinder50 ^^

talwinder50 commented 4 years ago

will work on it