1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package mongo
- import (
- "testing"
- "git.i2edu.net/i2/go-zero/core/breaker"
- "github.com/stretchr/testify/assert"
- )
- func TestRejectedPipe_All(t *testing.T) {
- assert.Equal(t, breaker.ErrServiceUnavailable, new(rejectedPipe).All(nil))
- }
- func TestRejectedPipe_AllowDiskUse(t *testing.T) {
- var p rejectedPipe
- assert.Equal(t, p, p.AllowDiskUse())
- }
- func TestRejectedPipe_Batch(t *testing.T) {
- var p rejectedPipe
- assert.Equal(t, p, p.Batch(1))
- }
- func TestRejectedPipe_Collation(t *testing.T) {
- var p rejectedPipe
- assert.Equal(t, p, p.Collation(nil))
- }
- func TestRejectedPipe_Explain(t *testing.T) {
- assert.Equal(t, breaker.ErrServiceUnavailable, new(rejectedPipe).Explain(nil))
- }
- func TestRejectedPipe_Iter(t *testing.T) {
- assert.EqualValues(t, rejectedIter{}, new(rejectedPipe).Iter())
- }
- func TestRejectedPipe_One(t *testing.T) {
- assert.Equal(t, breaker.ErrServiceUnavailable, new(rejectedPipe).One(nil))
- }
- func TestRejectedPipe_SetMaxTime(t *testing.T) {
- var p rejectedPipe
- assert.Equal(t, p, p.SetMaxTime(0))
- }
|