sheddergroup_test.go 330 B

1234567891011121314151617181920
  1. package load
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. )
  6. func TestGroup(t *testing.T) {
  7. group := NewShedderGroup()
  8. t.Run("get", func(t *testing.T) {
  9. limiter := group.GetShedder("test")
  10. assert.NotNil(t, limiter)
  11. })
  12. }
  13. func TestShedderClose(t *testing.T) {
  14. var nop nopCloser
  15. assert.Nil(t, nop.Close())
  16. }