diff --git a/filter/impl/tps_limit_fix_window_strategy_impl_test.go b/filter/impl/tps_limit_fix_window_strategy_impl_test.go index a78d0ec0709c470e26ba4194a5c7a5548cd2178b..55d0b14b75e69b44cf9ebe3a615e1a05c60d4b41 100644 --- a/filter/impl/tps_limit_fix_window_strategy_impl_test.go +++ b/filter/impl/tps_limit_fix_window_strategy_impl_test.go @@ -23,21 +23,21 @@ import ( ) import ( - "github.com/coreos/etcd/pkg/testutil" + "github.com/stretchr/testify/assert" ) func TestFixedWindowTpsLimitStrategyImpl_IsAllowable(t *testing.T) { strategy := NewFixedWindowTpsLimitStrategyImpl(2, 60000) - testutil.AssertTrue(t, strategy.IsAllowable()) - testutil.AssertTrue(t, strategy.IsAllowable()) - testutil.AssertFalse(t, strategy.IsAllowable()) + assert.True(t, strategy.IsAllowable()) + assert.True(t, strategy.IsAllowable()) + assert.False(t, strategy.IsAllowable()) strategy = NewFixedWindowTpsLimitStrategyImpl(2, 2000) - testutil.AssertTrue(t, strategy.IsAllowable()) - testutil.AssertTrue(t, strategy.IsAllowable()) - testutil.AssertFalse(t, strategy.IsAllowable()) + assert.True(t, strategy.IsAllowable()) + assert.True(t, strategy.IsAllowable()) + assert.False(t, strategy.IsAllowable()) time.Sleep(time.Duration(2100 * 1000)) - testutil.AssertTrue(t, strategy.IsAllowable()) - testutil.AssertTrue(t, strategy.IsAllowable()) - testutil.AssertFalse(t, strategy.IsAllowable()) + assert.True(t, strategy.IsAllowable()) + assert.True(t, strategy.IsAllowable()) + assert.False(t, strategy.IsAllowable()) }