From 0fa6f9f30f6a92c0707ff14344edc8b6daaa9e87 Mon Sep 17 00:00:00 2001 From: Roger Pack Date: Sat, 18 Apr 2009 22:39:12 +0000 Subject: [PATCH] remove the require rubygems from test, so that we can have more control over which version is being tested --- test/gc_benchmark.rb | 3 +-- test/test_all_hashes.rb | 1 - test/test_failure.rb | 1 - test/test_helper.rb | 3 +-- test/test_many_requests.rb | 1 - test/test_parsing_while_response_is_being_read.rb | 1 - test/test_threaded_sequel.rb | 4 ++-- 7 files changed, 4 insertions(+), 10 deletions(-) diff --git a/test/gc_benchmark.rb b/test/gc_benchmark.rb index e5fc7f5..4d0442c 100644 --- a/test/gc_benchmark.rb +++ b/test/gc_benchmark.rb @@ -1,4 +1,3 @@ -require 'rubygems' require 'mysqlplus' require 'benchmark' @@ -38,4 +37,4 @@ Benchmark.bmbm do |x| end end -puts $gc_stats.join( ' | ' ) \ No newline at end of file +puts $gc_stats.join( ' | ' ) diff --git a/test/test_all_hashes.rb b/test/test_all_hashes.rb index 0f839b0..b5527bf 100644 --- a/test/test_all_hashes.rb +++ b/test/test_all_hashes.rb @@ -3,7 +3,6 @@ # note that we load all the rows first, then run .all_hashes on the result [to see more easily the effect of all hashes] # on my machine and a 200_000 row table, it took 3.38s versus 3.65s for the old .each_hash way [note also that .each_hash is # almost as fast, now, as .all_hashes--they've both been optimized] -require 'rubygems' require 'mysqlplus' use_the_all_hashes_method = true diff --git a/test/test_failure.rb b/test/test_failure.rb index c6aa285..48fcf39 100644 --- a/test/test_failure.rb +++ b/test/test_failure.rb @@ -1,4 +1,3 @@ -require 'rubygems' require 'mysqlplus' begin Mysql.real_connect('fakehost','root', '', 'local_leadgen_dev') diff --git a/test/test_helper.rb b/test/test_helper.rb index e66efe8..f19d466 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,3 @@ -require 'rubygems' require 'mysqlplus' class MysqlTest @@ -196,4 +195,4 @@ class ThreadedMysqlTest < MysqlTest end end -end \ No newline at end of file +end diff --git a/test/test_many_requests.rb b/test/test_many_requests.rb index 7e4f99a..8979a6b 100644 --- a/test/test_many_requests.rb +++ b/test/test_many_requests.rb @@ -1,4 +1,3 @@ -require 'rubygems' require 'mysqlplus' a = Mysql.real_connect('localhost','root') 100.times { a.query("select sleep(0)") } diff --git a/test/test_parsing_while_response_is_being_read.rb b/test/test_parsing_while_response_is_being_read.rb index 7f4d237..a44d28a 100644 --- a/test/test_parsing_while_response_is_being_read.rb +++ b/test/test_parsing_while_response_is_being_read.rb @@ -5,7 +5,6 @@ # from .82s to .62s # you can experiment with it by changing the query here to be a long one, and toggling the do_the_use_query_optimization variable # this also has the interesting property of 'freeing' Ruby to do thread changes mid-query. -require 'rubygems' require 'mysqlplus' do_the_use_query_optimization = true diff --git a/test/test_threaded_sequel.rb b/test/test_threaded_sequel.rb index 51a2ce2..036c6ed 100644 --- a/test/test_threaded_sequel.rb +++ b/test/test_threaded_sequel.rb @@ -1,7 +1,7 @@ +require 'mysqlplus' require 'rubygems' require 'sequel' -require 'mysqlplus' class Mysql unless method_defined? :sync_query alias :sync_query :query @@ -21,4 +21,4 @@ start = Time.now end end.map{|t| t.join } -p (Time.now - start) \ No newline at end of file +p (Time.now - start)