File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
spannerlib/wrappers/spannerlib-ruby/spec Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 2424require_relative "mock_server/spanner_mock_server"
2525
2626<<<<<<< HEAD
27+ <<<<<<< HEAD
28+ =======
29+ >>>>>>> 04 a62e7 ( fix minitest after run hook to handle failing tests )
2730Signal . trap ( "TERM" ) do
2831 exit! ( 0 ) # "exit skips cleanup hooks and prevents gRPC segfaults
2932end
3033
34+ <<<<<<< HEAD
3135=======
3236>>>>>>> a953c19 ( chore ( ruby ) : Add CI workflow to run mock server tests )
37+ =======
38+ >>>>>>> 04 a62e7 ( fix minitest after run hook to handle failing tests )
3339begin
3440 server = GRPC ::RpcServer . new
3541 port = server . add_http2_port "127.0.0.1:0" , :this_port_is_insecure
Original file line number Diff line number Diff line change 3131$server_pid = nil
3232$server_port = nil
3333$port_file = nil
34+ $any_failure = false
3435
3536Minitest . after_run do
3637 if $server_pid
4243 end
4344 end
4445 File . delete ( $port_file) if $port_file && File . exist? ( $port_file)
45- # The Go Runtime inside the DLL conflicts with Ruby's shutdown sequence on Windows,
46- # causing a crash after tests pass. Process.exit!(0) skips the cleanup hooks
47- # and exits immediately with success status.
48- Process . exit! ( 0 )
46+ if $any_failure
47+ puts "Tests Failed! Exiting with code 1"
48+ $stdout. flush
49+ Process . exit! ( 1 )
50+ else
51+ puts "Tests Passed! Exiting with code 0"
52+ $stdout. flush
53+ Process . exit! ( 0 )
54+ end
4955end
5056
5157describe "Connection" do
You can’t perform that action at this time.
0 commit comments