       end
     end
 
-    {:ok, client} = Client.start_link("localhost", ctx.port, name: TestClientName)
+    {:ok, client} = Client.start_link("localhost", port, name: client_name)
 
-    {:ok, client: client}
+    {:ok, client: client, client_name: client_name}
   end
 
   thrift_test "it can return a simple boolean value", ctx do

    {:ok, handler_name: mod_name, port: server_port}
  end

  setup(ctx) do
    {:ok, agent} = Agent.start_link(fn -> nil end, name: :server_args)

    on_exit fn ->

    assert "username" == Agent.get(:server_args, &(&1))
  end

  thrift_test "client can be found by name", %{client: client, client_name: name} do
    assert client == Process.whereis(name)
  end

  thrift_test "client methods can be called by name instead of pid", %{client_name: name} do
    assert {:ok, true} == Client.ping(name)
  end
end
