GODT-1409 Wait in GetEvents during message preparation for live API.

This commit is contained in:
Jakub
2021-11-19 09:40:57 +01:00
parent 1d9855a190
commit 59075f2e26
6 changed files with 65 additions and 0 deletions

View File

@ -177,3 +177,6 @@ func (ctx *TestContext) SetLastError(err error) {
func (ctx *TestContext) GetLastError() error {
return ctx.lastError
}
func (ctx *TestContext) MessagePreparationStarted() { ctx.pmapiController.LockEvents() }
func (ctx *TestContext) MessagePreparationFinished() { ctx.pmapiController.UnlockEvents() }

View File

@ -42,6 +42,8 @@ type PMAPIController interface {
WasCalled(method, path string, expectedRequest []byte) bool
WasCalledRegex(methodRegex, pathRegex string, expectedRequest []byte) (bool, error)
GetCalls(method, path string) [][]byte
LockEvents()
UnlockEvents()
}
func newPMAPIController(app string, listener listener.Listener) (PMAPIController, pmapi.Manager) {