GODT-1474: Optimising live integration tests

- pkg/pmapi: Reduce max number of retries
- test/features: tweak create mailbox scenarios.
- test/context: change order of clean up steps
- test/context: logger field
- test/context: message preparation per username
- test/context: check that eventID has changed after adding messages
- test/features: make sure we wait 15sec before detecting import duplicates
This commit is contained in:
Jakub
2022-01-04 08:17:54 +01:00
parent d356f306d9
commit 22f427d522
13 changed files with 138 additions and 46 deletions

View File

@ -72,12 +72,15 @@ func newManager(cfg Config) *manager {
// Configure retry mechanism.
//
// SetRetryCount(30): The most probable value of Retry-After is 1s (max
// 10s). Retrying up to 30 times will most probably cause a delay of
// 30s. The worst case scenario is 5min which is OK for background
// requests. We shuold use context to control a foreground requests
// which should be finish or fail sooner.
m.rc.SetRetryCount(30)
// SetRetryCount(5): The most probable value of Retry-After from our
// API is 1s (max 10s). Retrying up to 5 times will on average cause a
// delay of 40s.
//
// NOTE: Increasing to values larger than 10 causing significant delay.
// The resty is increasing the delay between retries up to 1 minute
// (SetRetryMaxWaitTime) so for 10 retries the cumulative delay can be
// up to 5min.
m.rc.SetRetryCount(5)
m.rc.SetRetryMaxWaitTime(time.Minute)
m.rc.SetRetryAfter(catchRetryAfter)
m.rc.AddRetryCondition(m.shouldRetry)