postgres and mysql specific deadlock detection

This commit is contained in:
Nick Gauthier 2010-04-28 15:05:03 -04:00
parent 42a3fa834b
commit 2f874f1f1b
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Gauthier"]
s.date = %q{2010-04-22}
s.date = %q{2010-04-28}
s.description = %q{Spread your tests over multiple machines to test your code faster.}
s.email = %q{nick@smartlogicsolutions.com}
s.extra_rdoc_files = [

View File

@ -83,7 +83,9 @@ module Hydra #:nodoc:
# Process the results coming back from the worker.
def process_results(worker, message)
if message.output =~ /ActiveRecord::StatementInvalid(.*)[Dd]eadlock/
if message.output =~ /ActiveRecord::StatementInvalid(.*)[Dd]eadlock/ or
message.output =~ /PGError: ERROR(.*)[Dd]eadlock/ or
message.output =~ /Mysql::Error: SAVEPOINT(.*)does not exist: ROLLBACK/
trace "Deadlock detected running [#{message.file}]. Will retry at the end"
@files.push(message.file)
else