diff --git a/test/unit/execution_test.rb b/test/unit/execution_test.rb index c0c5d35..0b541c3 100644 --- a/test/unit/execution_test.rb +++ b/test/unit/execution_test.rb @@ -68,7 +68,9 @@ def test_active_record_instrumention_expiry instrumented_cache = lookup_store(expiry_batch_size: 2) uninstrumented_cache = lookup_store(active_record_instrumentation: false, expiry_batch_size: 2) calls = 0 + sql = [] callback = ->(*args) { + sql << args[-1][:sql] calls += 1 } @@ -101,6 +103,9 @@ def test_active_record_instrumention_expiry wait_for_background_tasks(instrumented_cache) end end + rescue Exception + puts sql.join("\n") + raise end unless ENV["NO_CONNECTS_TO"]