diff options
author | Benoit Daloze <[email protected]> | 2022-01-10 16:29:53 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2022-01-10 16:29:53 +0100 |
commit | 8abfc106058d09840d13f64e7e87cb7e40c3d6fa (patch) | |
tree | 9507c827b97e92780303cc980927777a7b2b7031 /spec/mspec/lib | |
parent | ca97001a945abf93dc5fbfe99f59f28c7d91e4c8 (diff) |
Update to ruby/mspec@3ea3d32
Diffstat (limited to 'spec/mspec/lib')
-rw-r--r-- | spec/mspec/lib/mspec/runner/actions/timeout.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/mspec/lib/mspec/runner/actions/timeout.rb b/spec/mspec/lib/mspec/runner/actions/timeout.rb index c85bf49ad3..fd5578be87 100644 --- a/spec/mspec/lib/mspec/runner/actions/timeout.rb +++ b/spec/mspec/lib/mspec/runner/actions/timeout.rb @@ -36,8 +36,21 @@ class TimeoutAction elapsed = now - @started if elapsed > @timeout STDERR.puts "\n#{@current_state.description}" + STDERR.puts "Example took longer than the configured timeout of #{@timeout}s" STDERR.flush - abort "Example took longer than the configured timeout of #{@timeout}s" + + if RUBY_ENGINE == 'truffleruby' + STDERR.puts 'Java stacktraces:' + Process.kill :SIGQUIT, Process.pid + sleep 1 + + if defined?(Truffle::Debug.show_backtraces) + STDERR.puts "\nRuby backtraces:" + Truffle::Debug.show_backtraces + end + end + + exit 2 end end end |