From bcbe81133351e1a4bcee8cbf45816b631cc2717b Mon Sep 17 00:00:00 2001 From: Stefan Wrobel Date: Wed, 9 May 2018 10:45:41 -0700 Subject: [PATCH] leak_stack_on_error in test environment (#1557) Fixes #1554 --- lib/puma/runner.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/puma/runner.rb b/lib/puma/runner.rb index 546db5ae..240cf3b8 100644 --- a/lib/puma/runner.rb +++ b/lib/puma/runner.rb @@ -22,6 +22,10 @@ module Puma @options[:environment] == "development" end + def test? + @options[:environment] == "test" + end + def log(str) @events.log str end @@ -168,7 +172,7 @@ module Puma server.early_hints = true end - unless development? + unless development? || test? server.leak_stack_on_error = false end