Skip to content

Instantly share code, notes, and snippets.

@flackou
flackou / mysql2_wait_timeout.rb
Created December 23, 2011 13:04
Testing mysql2 wait_timeout param
require 'rubygems'
gem 'mysql2'
gem 'activerecord', '3.1.1'
require 'active_record'
# http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout
MYSQL_WAIT_TIMEOUT_MAX = 2147483
# Testing the remote db connection after a 60s sleep
def test_connection(extra_conf = {})