satellite/metainfo: reduce RateLimit test flakyness

Delay of 100ms could happen due to other things happening on the test
server. Increase the time to 1s.

Change-Id: I2c7c21f966101771633d73e84cf9850d28089e71
This commit is contained in:
Egon Elbre 2020-04-29 14:20:02 +03:00
parent 39d77c31e8
commit 588826157b

View File

@ -1183,11 +1183,11 @@ func TestRateLimit_ProjectRateLimitOverride(t *testing.T) {
func TestRateLimit_ProjectRateLimitOverrideCachedExpired(t *testing.T) {
testplanet.Run(t, testplanet.Config{
SatelliteCount: 1, StorageNodeCount: 1, UplinkCount: 1,
SatelliteCount: 1, StorageNodeCount: 0, UplinkCount: 1,
Reconfigure: testplanet.Reconfigure{
Satellite: func(log *zap.Logger, index int, config *satellite.Config) {
config.Metainfo.RateLimiter.Rate = 2
config.Metainfo.RateLimiter.CacheExpiration = 100 * time.Millisecond
config.Metainfo.RateLimiter.CacheExpiration = time.Second
},
},
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
@ -1220,7 +1220,7 @@ func TestRateLimit_ProjectRateLimitOverrideCachedExpired(t *testing.T) {
err = satellite.DB.Console().Projects().Update(ctx, &projects[0])
require.NoError(t, err)
time.Sleep(time.Second)
time.Sleep(2 * time.Second)
var group2 errs2.Group