ExUnit failing with introduction of AMQP in application start

hey all, relatively new to Phoenix and I’m hoping to get some guidance on an issue I’ve run into. I added AMQP messaging to the application

# application.ex

  def start(_type, _args) do

# messaging.ex

  def initialize() do
    {:ok, channel} = AMQP.Application.get_channel(:channel)

This works fine in development but when I run my test cases I get the following failure:

** (Mix) Could not start application photon: exited in: Photon.Application.start(:normal, [])
    ** (EXIT) exited in: GenServer.call(:"Elixir.AMQP.Application.Channel::channel", :get_channel, 5000)
        ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started

You’re gonna need to provide more of that start function, we need to see how you’re setting up your supervision tree. My suspicion is there’s some sort of environment variable that is failing.

My apologies, and thank you for the assistance. Here is the full function

  def start(_type, _args) do
    mongo_url = Application.get_env(:photon, :mongo_url)

    children = [

      {Phoenix.PubSub, name: Photon.PubSub},
         name: :mongo,
         url: mongo_url,
         pool_size: 2,
         ssl: true,
         ssl_opts: [
           ciphers: ['AES256-GCM-SHA384']

    opts = [strategy: :one_for_one, name: Photon.Supervisor]
    Supervisor.start_link(children, opts)

Are you saying Photon.Messaging.initialize() would come after Supervisor.start_link maybe?

Ah you were correct, it was just a configuration issue. Hadn’t set up AMQP in my test.exs