@@ -49,7 +49,7 @@ defmodule Sentry.LoggerBackendTest do
4949 json = Jason . decode! ( body )
5050
5151 assert List . first ( json [ "exception" ] ) [ "value" ] ==
52- ~s[ Erlang error: {:bad_return_value, "I am throwing"} ]
52+ ~s[ ** (exit) bad return value: "I am throwing"]
5353
5454 assert conn . request_path == "/api/1/store/"
5555 assert conn . method == "POST"
@@ -75,8 +75,8 @@ defmodule Sentry.LoggerBackendTest do
7575 Bypass . expect ( bypass , fn conn ->
7676 { :ok , body , conn } = Plug.Conn . read_body ( conn )
7777 json = Jason . decode! ( body )
78- assert List . first ( json [ "exception" ] ) [ "type" ] == "ErlangError "
79- assert List . first ( json [ "exception" ] ) [ "value" ] == "Erlang error: :bad_exit"
78+ assert List . first ( json [ "exception" ] ) [ "type" ] == "Sentry.CrashError "
79+ assert List . first ( json [ "exception" ] ) [ "value" ] == "** (exit) :bad_exit"
8080 assert conn . request_path == "/api/1/store/"
8181 assert conn . method == "POST"
8282 send ( self_pid , "API called" )
@@ -166,11 +166,9 @@ defmodule Sentry.LoggerBackendTest do
166166 { :ok , body , conn } = Plug.Conn . read_body ( conn )
167167 json = Jason . decode! ( body )
168168
169- exception_value =
170- List . first ( json [ "exception" ] )
171- |> Map . fetch! ( "value" )
172-
173- assert String . contains? ( exception_value , "{:timeout, {GenServer, :call" )
169+ assert List . first ( json [ "exception" ] ) [ "type" ] == "Sentry.CrashError"
170+ assert List . first ( json [ "exception" ] ) [ "value" ] =~ "** (EXIT) time out"
171+ assert List . first ( json [ "exception" ] ) [ "value" ] =~ "GenServer\. call"
174172
175173 assert conn . request_path == "/api/1/store/"
176174 assert conn . method == "POST"
0 commit comments