   test "invalid password" do
     assert_exit(fn ->
       { :ok, pid } = Connection.start_link([port: 9494, auth: {:plain, "user", "ps"}])
-      Process.sleep(100)
+      :timer.sleep(100)
       { :ok } = Connection.close(pid)
     end, ~r/auth.*not.*successful/i)
   end

  test "fail on unsupported auth type" do
    assert_exit(fn ->
      { :ok, pid } = Connection.start_link([port: 9494, auth: {:ldap, "user", "pass"}])
      Process.sleep(100)
      { :ok } = Connection.close(pid)
    end, ~r/only supports :plain/)
  end

  test "continue if auth is not supported" do
    assert capture_log(fn ->
      { :ok, pid } = Connection.start_link([auth: {:plain, "user", "pass"}])
      :timer.sleep(100)
      { :ok } = Connection.close(pid)
    end) =~ "Authentication not required"
  end
