mirror of
https://github.com/grafana/grafana.git
synced 2025-01-02 12:17:01 -06:00
Encryption: Increase context timeout on flaky test (#43553)
This commit is contained in:
parent
56c3875bb9
commit
80e0dd74d2
@ -277,15 +277,15 @@ func TestSecretsService_Run(t *testing.T) {
|
||||
require.Len(t, svc.dataKeyCache, 1)
|
||||
|
||||
// Execute background process after key's TTL, to force
|
||||
// clean up process, during a millisecond with gc ticker
|
||||
// configured on every nanosecond, to ensure the ticker
|
||||
// is triggered.
|
||||
// clean up process, during a hundred milliseconds with
|
||||
// gc ticker configured on every nanosecond, to ensure
|
||||
// the ticker is triggered.
|
||||
gcInterval = time.Nanosecond
|
||||
|
||||
t.Cleanup(func() { now = time.Now })
|
||||
now = func() time.Time { return time.Now().Add(dekTTL) }
|
||||
|
||||
ctx, cancel := context.WithTimeout(ctx, time.Millisecond)
|
||||
ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
|
||||
defer cancel()
|
||||
|
||||
err = svc.Run(ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user