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