summaryrefslogtreecommitdiff
path: root/test/json/test_json_generate.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-14 18:56:12 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-14 18:56:12 +0000
commit05af801f4cc6936a58ec5ba65584bff25db2863b (patch)
tree6281f6433dfed19f9f4f3a97ae61464ad19e2e45 /test/json/test_json_generate.rb
parentd2e2b309e82f9f0f68f62952673233331465917f (diff)
Adds another timeouts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/json/test_json_generate.rb')
-rwxr-xr-xtest/json/test_json_generate.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/json/test_json_generate.rb b/test/json/test_json_generate.rb
index be42206..2766109 100755
--- a/test/json/test_json_generate.rb
+++ b/test/json/test_json_generate.rb
@@ -217,9 +217,15 @@ EOT
require'timeout'
def test_gc
bignum_too_long_to_embed_as_string = 1234567890123456789012345
- expect = bignum_too_long_to_embed_as_string.to_s
- GC.start
- stress, GC.stress = GC.stress, true
+ expect = nil
+ stress = nil
+ timeout(1) do
+ expect = bignum_too_long_to_embed_as_string.to_s
+ end
+ timeout(30) do
+ GC.start
+ stress, GC.stress = GC.stress, true
+ end
timeout(30) do
10.times do |i|