@@ -775,8 +775,10 @@ defmodule Logger.TranslatorTest do
775775 assert capture_log ( :info , fn ->
776776 trap = Process . flag ( :trap_exit , true )
777777 children = [ worker ( __MODULE__ , [ ] , function: :error ) ]
778- Supervisor . start_link ( children , strategy: :one_for_one )
779- receive do: ( { :EXIT , _ , { :shutdown , { :failed_to_start_child , _ , _ } } } -> :ok )
778+
779+ assert { :error , { :shutdown , { :failed_to_start_child , __MODULE__ , :stop } } } =
780+ Supervisor . start_link ( children , strategy: :one_for_one )
781+
780782 Process . flag ( :trap_exit , trap )
781783 end ) =~ ~r"""
782784 \[ error\] Child Logger.TranslatorTest of Supervisor #PID<\d +\. \d +\. \d +> \( Supervisor\. Default\) failed to start
@@ -789,8 +791,10 @@ defmodule Logger.TranslatorTest do
789791 assert capture_log ( :info , fn ->
790792 trap = Process . flag ( :trap_exit , true )
791793 children = [ worker ( __MODULE__ , [ ] , function: :undef ) ]
792- Supervisor . start_link ( children , strategy: :one_for_one )
793- receive do: ( { :EXIT , _ , { :shutdown , { :failed_to_start_child , _ , _ } } } -> :ok )
794+
795+ assert { :error , { :shutdown , { :failed_to_start_child , __MODULE__ , { :EXIT , _ } } } } =
796+ Supervisor . start_link ( children , strategy: :one_for_one )
797+
794798 Process . flag ( :trap_exit , trap )
795799 end ) =~ ~r"""
796800 \[ error\] Child Logger.TranslatorTest of Supervisor #PID<\d +\. \d +\. \d +> \( Supervisor\. Default\) failed to start
0 commit comments