From 943be923f0d9a8d7248e5eb04595306cb31bf0da Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 9 Oct 2006 02:02:27 +0000 Subject: Added timeout option to SQLite3 configurations to deal more gracefully with SQLite3::BusyException, now the connection can instead retry for x seconds to see if the db clears up before throwing that exception (closes #6126) [wreese@gmail.com] Added default timeout setting of 5 seconds to SQLite3 database.yml configurations [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/connections/native_sqlite3/connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test') diff --git a/activerecord/test/connections/native_sqlite3/connection.rb b/activerecord/test/connections/native_sqlite3/connection.rb index 008ea686d6..6dbb2b98c1 100644 --- a/activerecord/test/connections/native_sqlite3/connection.rb +++ b/activerecord/test/connections/native_sqlite3/connection.rb @@ -11,7 +11,7 @@ sqlite_test_db = "#{BASE_DIR}/fixture_database.sqlite3" sqlite_test_db2 = "#{BASE_DIR}/fixture_database_2.sqlite3" def make_connection(clazz, db_file, db_definitions_file) - ActiveRecord::Base.configurations = { clazz.name => { :adapter => 'sqlite3', :database => db_file } } + ActiveRecord::Base.configurations = { clazz.name => { :adapter => 'sqlite3', :database => db_file, :timeout => 5000 } } unless File.exist?(db_file) puts "SQLite3 database not found at #{db_file}. Rebuilding it." sqlite_command = %Q{sqlite3 #{db_file} "create table a (a integer); drop table a;"} -- cgit v1.2.3