forked from Silverfish/proton-bridge
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:
@ -107,9 +107,12 @@ func New() *TestContext {
|
||||
smtpLastResponses: make(map[string]*mocks.SMTPResponse),
|
||||
smtpResponseLocker: &sync.Mutex{},
|
||||
bddMessageIDsToAPIIDs: make(map[string]string),
|
||||
logger: logrus.StandardLogger(),
|
||||
logger: logrus.StandardLogger().WithField("ctx", "scenario"),
|
||||
}
|
||||
|
||||
ctx.logger.Info("New context")
|
||||
ctx.addCleanup(func() { ctx.logger.Info("Context end") }, "End of context")
|
||||
|
||||
// Ensure that the config is cleaned up after the test is over.
|
||||
ctx.addCleanupChecked(ctx.locations.Clear, "Cleaning bridge config data")
|
||||
|
||||
@ -163,5 +166,9 @@ func (ctx *TestContext) GetLastError() error {
|
||||
return ctx.lastError
|
||||
}
|
||||
|
||||
func (ctx *TestContext) MessagePreparationStarted() { ctx.pmapiController.LockEvents() }
|
||||
func (ctx *TestContext) MessagePreparationFinished() { ctx.pmapiController.UnlockEvents() }
|
||||
func (ctx *TestContext) MessagePreparationStarted(username string) {
|
||||
ctx.pmapiController.LockEvents(username)
|
||||
}
|
||||
func (ctx *TestContext) MessagePreparationFinished(username string) {
|
||||
ctx.pmapiController.UnlockEvents(username)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user