summaryrefslogtreecommitdiff
path: root/test/openssl/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl/utils.rb')
-rw-r--r--test/openssl/utils.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb
index 43ecd79eca..bbc9c7efc2 100644
--- a/test/openssl/utils.rb
+++ b/test/openssl/utils.rb
@@ -201,7 +201,16 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
end
class OpenSSL::TestCase < Test::Unit::TestCase
+ def setup
+ if ENV["OSSL_GC_STRESS"] == "1"
+ GC.stress = true
+ end
+ end
+
def teardown
+ if ENV["OSSL_GC_STRESS"] == "1"
+ GC.stress = false
+ end
# OpenSSL error stack must be empty
assert_equal([], OpenSSL.errors)
end
@@ -212,6 +221,7 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
ITERATIONS = ($0 == __FILE__) ? 100 : 10
def setup
+ super
@ca_key = OpenSSL::TestUtils::TEST_KEY_RSA2048
@svr_key = OpenSSL::TestUtils::TEST_KEY_RSA1024
@cli_key = OpenSSL::TestUtils::TEST_KEY_DSA1024