File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ defmodule Ecto.Integration.StorageTest do
122122 end
123123
124124 test "structure load will fail on SQL errors" do
125+ create_database ( )
125126 File . mkdir_p! ( tmp_path ( ) )
126127 error_path = Path . join ( tmp_path ( ) , "error.sql" )
127128 File . write! ( error_path , "SELECT 1; SELECKT 1; SELECT 2;" )
@@ -130,6 +131,8 @@ defmodule Ecto.Integration.StorageTest do
130131 Ecto.Adapters.MyXQL . structure_load ( tmp_path ( ) , [ dump_path: error_path ] ++ params ( ) )
131132
132133 assert message =~ ~r/ ERROR.*SELECKT/
134+ after
135+ drop_database ( )
133136 end
134137
135138 test "storage status is up when database is created" do
Original file line number Diff line number Diff line change @@ -587,6 +587,7 @@ defmodule Ecto.Adapters.MyXQL do
587587 env: validate_env ( env ) ,
588588 args: args
589589 ]
590+
590591 # Trap exits in case mysql dies in the middle of execution so that we can surface the error
591592 Process . flag ( :trap_exit , true )
592593 port = Port . open ( { :spawn_executable , abs_cmd } , port_opts )
You can’t perform that action at this time.
0 commit comments