summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-08-29 10:40:32 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-08-29 17:37:44 +0900
commit4e5b3e58e26cf65e383ddb60ebb89e3ecd66824e (patch)
tree27f0d45a2f99bcc7221cacfc7d731cebe170a03a /test
parenta780633d2af00e79b8437b0a7d988dbdadb0d80f (diff)
Make optional benchmark test in test_find_in_unresolved_tree_is_not_exponentiental
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11490
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_specification.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 0a67dad25d..81c601f007 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true
-require "benchmark"
require_relative "helper"
require "date"
require "pathname"
@@ -146,6 +145,12 @@ end
end
def test_find_in_unresolved_tree_is_not_exponentiental
+ begin
+ require "benchmark"
+ rescue LoadError
+ pend "Benchmark is not available in this environment. Please install it with `gem install benchmark`."
+ end
+
pend "currently slower in CI on TruffleRuby" if RUBY_ENGINE == "truffleruby"
num_of_pkg = 7
num_of_version_per_pkg = 3