       end)
     end
 
-    test "adds an error to the created span", %{pid: pid} do
+    test "adds an error to the created span" do
       until(fn ->
         assert {:ok, [{%Span{}, %ArgumentError{message: "argument error"}, stack}]} =
                  Test.Span.get(:add_error)

      end)
    end

    test "closes the existing span", %{span: span, pid: pid} do
      until(fn ->
        assert {:ok, [{^span}]} = Test.Tracer.get(:close_span)
      end)

defmodule Appsignal.Error.BackendTest do
  use ExUnit.Case, async: true
  import AppsignalTest.Utils
  alias Appsignal.{Error.Backend, Span, Test, Tracer, WrappedNif}

  setup do
