anchor.diff:        end,
         [{async, self()}]).
   
  -listen_notify_test() ->
  -    with_connection(
  -      fun(C) ->
  -          {ok, [], []}     = pgsql:squery(C, "listen epgsql_test"),
  -          {ok, _, [{Pid}]} = pgsql:equery(C, "select pg_backend_pid()"),
  -          {ok, [], []}     = pgsql:squery(C, "notify epgsql_test"),
  +listen_notify_test(Module) ->
  +    with_connection(
  +      Module,
  +      fun(C) ->
  +          {ok, [], []}     = Module:squery(C, "listen epgsql_test"),
  +          {ok, _, [{Pid}]} = Module:equery(C, "select pg_backend_pid()"),
  +          {ok, [], []}     = Module:squery(C, "notify epgsql_test"),
             receive
                 {pgsql, C, {notification, <<"epgsql_test">>, Pid, <<>>}} -> ok
             after
  
positive.code:     end.
  
  
  connect_with_ssl_test() ->
      lists:foreach(fun application:start/1, ?ssl_apps),
      with_connection(
        fun(C) ->
                {ok, _Cols, [{true}]} = pgsql:equery(C, "select ssl_is_used()")
        end,
        "epgsql_test",
        [{ssl, true}]).
  
  connect_with_client_cert_test() ->
      lists:foreach(fun application:start/1, ?ssl_apps),
      Dir = filename:join(filename:dirname(code:which(pgsql_tests)), "../test_data"),
      File = fun(Name) -> filename:join(Dir, Name) end,
  
negative.code:       end,
        [{async, self()}]).
  
  application_test(_Module) ->
      lists:foreach(fun application:start/1, ?ssl_apps),
      ok = application:start(epgsql).
  
  