* move error_accumulator into internal pkg (#304) * move error_accumulator into internal pkg (#304) * add a test for ErrTooManyEmptyStreamMessages in stream_reader (#304)
This commit is contained in:
committed by
GitHub
parent
fa694c61c2
commit
1394329e44
21
internal/test/failer.go
Normal file
21
internal/test/failer.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package test
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
ErrTestErrorAccumulatorWriteFailed = errors.New("test error accumulator failed")
|
||||
)
|
||||
|
||||
type FailingErrorBuffer struct{}
|
||||
|
||||
func (b *FailingErrorBuffer) Write(_ []byte) (n int, err error) {
|
||||
return 0, ErrTestErrorAccumulatorWriteFailed
|
||||
}
|
||||
|
||||
func (b *FailingErrorBuffer) Len() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (b *FailingErrorBuffer) Bytes() []byte {
|
||||
return []byte{}
|
||||
}
|
||||
Reference in New Issue
Block a user