mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 07:26:47 +00:00
Kucoin: Fix intermittent TestPushData failure (#2116)
* Testing: Fix FixtureToDataHandlerWithErrors logging []byte * Kucoin: Fix global mutexes and maps Highlighted by: ``` go test -count 2 -run TestPushData ``` that the second run wasn't finding a futures orderbook, because the instance had changed but kucoin was using a global map
This commit is contained in:
@@ -133,7 +133,7 @@ func MockWsInstance[T any, PT interface {
|
||||
// FixtureError contains an error and the message that caused it
|
||||
type FixtureError struct {
|
||||
Err error
|
||||
Msg []byte
|
||||
Msg string
|
||||
}
|
||||
|
||||
// FixtureToDataHandler squirts the contents of a file to a reader function (probably e.wsHandleData) and asserts no errors are returned
|
||||
@@ -163,7 +163,7 @@ func FixtureToDataHandlerWithErrors(tb testing.TB, fixturePath string, reader fu
|
||||
if err := reader(tb.Context(), msg); err != nil {
|
||||
errs = append(errs, FixtureError{
|
||||
Err: err,
|
||||
Msg: msg,
|
||||
Msg: string(msg),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user