oysterprotocol / brokernode

Server that connects to the Tangle to enable the Oyster Protocol
36 stars 9 forks source link

Investigate "invalid connection" errors that occur when running the unit tests on Travis #628

Closed rfornea closed 5 years ago

rfornea commented 5 years ago

This started happening recently with the travis builds, and doesn't seem to consistently happen at a certainly place in the unit tests. But it's always an invalid connection error, and seems to only happen during the Travis builds.

--- FAIL: Test_ActionSuite (8.96s)
    --- FAIL: Test_ActionSuite/Test_UploadSessionsGetPaymentStatus_BetaConfirmed (1.00s)
        require.go:794: 
                Error Trace:    model.go:26
                                            suite.go:61
                                            actions_test.go:21
                                            suite.go:88
                Error:          Received unexpected error:
                                invalid connection
                                github.com/gobuffalo/pop.(*Connection).timeFunc
                                    /go/src/github.com/gobuffalo/pop/connection.go:209
                                github.com/gobuffalo/pop.(*Query).Exec
                                    /go/src/github.com/gobuffalo/pop/executors.go:22
                                github.com/gobuffalo/pop.(*mysql).TruncateAll
                                    /go/src/github.com/gobuffalo/pop/dialect_mysql.go:176
                                github.com/gobuffalo/pop.(*Connection).TruncateAll
                                    /go/src/github.com/gobuffalo/pop/connection.go:201
                                github.com/gobuffalo/suite.(*Model).SetupTest
                                    /go/src/github.com/gobuffalo/suite/model.go:25
                                github.com/gobuffalo/suite.(*Action).SetupTest
                                    /go/src/github.com/gobuffalo/suite/suite.go:61
                                github.com/oysterprotocol/brokernode/actions/v2.(*ActionSuite).SetupTest
                                    /go/src/github.com/oysterprotocol/brokernode/actions/v2/actions_test.go:21
                                github.com/stretchr/testify/suite.Run.func2
                                    /go/src/github.com/stretchr/testify/suite/suite.go:88
                                testing.tRunner
                                    /usr/local/go/src/testing/testing.go:777
                                runtime.goexit
                                    /usr/local/go/src/runtime/asm_amd64.s:2361
                Test:           Test_ActionSuite/Test_UploadSessionsGetPaymentStatus_BetaConfirmed