Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start Email Server from test suite in parallel #1067

Closed
2 tasks done
irby opened this issue Oct 6, 2023 · 3 comments
Closed
2 tasks done

Unable to start Email Server from test suite in parallel #1067

irby opened this issue Oct 6, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@irby
Copy link
Contributor

irby commented Oct 6, 2023

Checklist

  • I could not find a solution in the existing issues or docs.
  • I agree to follow this project's Code of Conduct.

Describe the bug

Currently, we only have a single test suite that requires an email server, passcode_test.

For #1030 , this work will require multiple test suites to rely on an email server. The test suite setup and tear down is responsible for starting and stopping the mock email server, respectively. I've been running into problems where running multiple test suites in parallel ends up causing failures because tests cannot start / connect to the mock email server because another test suite has started / stopped it.

Reproducing the bug

Have 2 or more test suites setup with WithEmailServer set to true, and with tests that handle sending an email out.

Logs

No response

Configuration

No response

Hanko Version

0.8.3

OS Hanko Backend

None

OS Version Hanko Backend

No response

OS

None

OS Version

No response

Browser Version

No response

Environment

None

Additional Context

No response

@irby irby added the bug Something isn't working label Oct 6, 2023
@irby
Copy link
Contributor Author

irby commented Oct 10, 2023

@FlxMgdnz @like-a-bause What are your thoughts on refactoring the unit tests that rely on a email server to use a Mailslurper instance? I can create an abstraction that interacts with Mailslurper's API and use it within my tests to fetch emails / clear emails.

I think this will come to our advantage to make it easier to inspect emails sent to the server and verify the content within.

This would likely require the Docker container be started before tests are run, and then spin this instance down after tests complete.

@FlxMgdnz
Copy link
Member

Thanks @irby. Sounds good to me.

@lfleischmann any thoughts?

@lfleischmann
Copy link
Member

@lfleischmann any thoughts?

No. Sounds resonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants