mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	btest: resource limit
* bootstraptest/test_thread.rb: rescue resource limitation errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									469bac0f92
								
							
						
					
					
						commit
						373a7006dd
					
				
					 1 changed files with 12 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -25,8 +25,9 @@ rescue ThreadError => e
 | 
			
		|||
  :ok if /can't create Thread/ =~ e.message
 | 
			
		||||
end
 | 
			
		||||
}
 | 
			
		||||
assert_equal %q{5000}, %q{
 | 
			
		||||
  5000.times{|e|
 | 
			
		||||
assert_equal %q{ok}, %q{
 | 
			
		||||
begin
 | 
			
		||||
  :ok if 5000 == 5000.times{|e|
 | 
			
		||||
    (1..2).map{
 | 
			
		||||
      Thread.new{
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			@ -34,9 +35,13 @@ assert_equal %q{5000}, %q{
 | 
			
		|||
      e.join()
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
rescue ThreadError => e
 | 
			
		||||
  :ok if /can't create Thread/ =~ e.message
 | 
			
		||||
end
 | 
			
		||||
}
 | 
			
		||||
assert_equal %q{5000}, %q{
 | 
			
		||||
  5000.times{|e|
 | 
			
		||||
assert_equal %q{ok}, %q{
 | 
			
		||||
begin
 | 
			
		||||
  :ok if 5000 == 5000.times{|e|
 | 
			
		||||
    (1..2).map{
 | 
			
		||||
      Thread.new{
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			@ -44,6 +49,9 @@ assert_equal %q{5000}, %q{
 | 
			
		|||
      e.join(1000000000)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
rescue ThreadError => e
 | 
			
		||||
  :ok if /can't create Thread/ =~ e.message
 | 
			
		||||
end
 | 
			
		||||
}
 | 
			
		||||
assert_equal %q{ok}, %q{
 | 
			
		||||
begin
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue