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

Independent TestServer per calling process #45

Merged
merged 2 commits into from
Aug 12, 2016

Conversation

keichan34
Copy link
Contributor

I found that TestServer was getting clogged with multiple messages when using async tests. This starts up a new TestServer for each calling process, so they're automatically isolated. If you're using tests that span multiple processes, you should pass the pid of the process who owns the TestServer (the one who accessed it first) to any of the TestServer functions (deliveries, register_delivery, clear_deliveries).

Start with Mailman.TestServerSupervisor.start_link/0. Mailman.TestServer API is nearly identical, with the exception of explicit parent process arguments (will use self() as a default).

Start with Mailman.TestServerSupervisor.start_link/0. Mailman.TestServer
API is nearly identical, with the exception of explicit parent process
arguments (will use self() as a default).
Temporarily switches TestServer back to the old behaviour where all
requests would go to one TestServer.
@kamilc kamilc merged commit ff2727d into mailman-elixir:master Aug 12, 2016
@kamilc
Copy link
Collaborator

kamilc commented Aug 12, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants