elitau / pact_elixir

Elixir version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
MIT License
34 stars 8 forks source link

Supervise mock servers #5

Open elitau opened 6 years ago

elitau commented 6 years ago

During boot of the pact_elixir application a Supervisor with :simple_one_for_one strategy (or the new Dynamic Supervisor should be started. Then start mock servers upon test run with Supervisor.start_child(supervisor_pid, [args]) and stop them with Supervisor.terminate_child(supervisor_pid, child_pid).

Thus the mock servers would be restarted upon errors during test runs without bringing the whole application down.

elitau commented 6 years ago

Added in d3100ba40881bb96e529b3d9ba00ba6abec73e4a