Show relationship info on circular rel failure
Dagfinn Ilmari Mannsåker [Wed, 21 Jan 2015 14:21:48 +0000 (14:21 +0000)]
I've seen this fail with bogus SQL on DB2 on Travis, but can't
reproduce it. Let's at least get some info if it happens again.

t/backcompat/0.04006/lib/dbixcsl_common_tests.pm

index ef8479b..cbd6c1e 100644 (file)
@@ -436,7 +436,11 @@ sub run_tests {
                 $obj10_2->loader_test11( $obj11->id11() );
                 $obj10_2->update();
             };
-            is($@, '', 'No errors after eval{}');
+            is($@, '', 'No errors after eval{}')
+                or do {
+                    diag explain $class11->relationship_info('loader_test10');
+                    diag explain $class10->relationship_info('loader_test11');
+                };
 
             SKIP: {
                 skip 'Previous eval block failed', 3