Skip Menu |

This queue is for tickets about the BPM-Engine CPAN distribution.

Report information
The Basics
Id: 115219
Status: new
Priority: 0/
Queue: BPM-Engine

People
Owner: Nobody in particular
Requestors: ribasushi [...] leporine.io
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: An upcoming release of DBIx::Class 0.082900 will break this module
Your comprehensive test suite will be tripped by an upcoming change of exception texts (due to several codepath consolidations). Attached please find a patch addressing the problem ( it works on DBIC before and after the change ) Cheers!
Subject: fix_overly_specific_regex_for_upcoming_DBIC_0.082900.txt
From af03266d2ea37f930992896ef724a5737f9a2062 Mon Sep 17 00:00:00 2001 From: Peter Rabbitson <ribasushi@cpan.org> Date: Thu, 9 Jun 2016 23:04:10 +0200 Subject: [PATCH] Relax overly-specific exception matches --- t/02-store/06-pi-attributes.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/02-store/06-pi-attributes.t b/t/02-store/06-pi-attributes.t index cad07dd..3e7d321 100644 --- a/t/02-store/06-pi-attributes.t +++ b/t/02-store/06-pi-attributes.t @@ -10,9 +10,12 @@ my $process = $schema->resultset('Process')->create({ package_id => $package->id #-- create +# this has changed too often on various DBIC versions :/ +my $dbic_expecting_hashref_error = qr/(?:expects|needs|requires|must be) a(?: single)? hash/; + my $rs = $schema->resultset('ProcessInstanceAttribute'); isa_ok(exception { $rs->create() }, 'DBIx::Class::Exception'); -like( exception { $rs->create() }, qr/create needs a hashref/); +like( exception { $rs->create() }, $dbic_expecting_hashref_error); # mysql: execute failed: Field 'process_instance' doesn't have a default value isa_ok(exception { $rs->create({}) }, 'DBIx::Class::Exception'); #like( exception { $rs->create({}) }, qr/process_instance_id may not be NULL/); @@ -37,7 +40,7 @@ isa_ok($pia->process_instance, 'BPM::Engine::Store::Result::ProcessInstance'); $pi = $process->new_instance(); isa_ok(exception { $pi->add_to_attributes() }, 'DBIx::Class::Exception'); -like( exception { $pi->add_to_attributes() }, qr/needs a hash/); +like( exception { $pi->add_to_attributes() }, $dbic_expecting_hashref_error); isa_ok(exception { $pi->add_to_attributes({}) }, 'DBIx::Class::Exception'); # mysql: execute failed: Field 'name' doesn't have a default value #like( exception { $pi->add_to_attributes({}) }, qr/wfe_process_instance_attr.name may not be NULL/); -- 2.1.4