   test "Crashing GenServer with throw", %{fake_transaction: fake_transaction} do
     CrashingGenServer.start(:throw)
 
+    Process.sleep(@process_monitor_delay)
+
     [{_, reason, message, stacktrace}] =
       until(fn ->
         assert [{_, _, _, _}] = FakeTransaction.errors(fake_transaction)

      end)
      |> Task.await(1)
    end)

    [{_, reason, message, stacktrace}] =
      until(fn ->

  test "proc_lib.spawn + badmatch error", %{fake_transaction: fake_transaction} do
    :proc_lib.spawn(fn -> throw({:badmatch, [1, 2, 3]}) end)

    Process.sleep(@process_monitor_delay)

    [{_, reason, message, stacktrace}] =
      until(fn ->
        assert [{_, _, _, _}] = FakeTransaction.errors(fake_transaction)
