I have a test, that reads
Auth Code from mailbox and uses it to log in. I use
Gmail API for that.
I would like to have several such tests, that will run in parallel.
However, I don't know, how to distinguish emails from each other, because the only thing, that is different about 2 emails is this
race condition looks like this:
test-1sends an email at
test-2sends an email at
- it takes
3 secondsfor the
email-1to arrive =>
- it takes only
1 secondfor the
email-2to arrive =>
test-1reads the first unread matching email, and it is an
Auth code is wrong.
So, my question here is:
could you please think of any possible solution to avoid such a race condition and identify the email?