File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -171,16 +171,16 @@ def multiplex(*a, **kw)
171171 end
172172 end
173173
174- describe "after_query when errors are raised" do
175- class InspectQueryInstrumentation
176- class << self
177- attr_reader :last_json
178- def before_query ( query )
179- end
174+ describe "execute_query when errors are raised" do
175+ module InspectQueryInstrumentation
176+ def execute_multiplex ( multiplex :)
177+ super
178+ ensure
179+ InspectQueryInstrumentation . last_json = multiplex . queries . first . result . to_json
180+ end
180181
181- def after_query ( query )
182- @last_json = query . result . to_json
183- end
182+ class << self
183+ attr_accessor :last_json
184184 end
185185 end
186186
@@ -212,7 +212,7 @@ def raise_exception
212212 end
213213
214214 query ( Query )
215- instrument ( :query , InspectQueryInstrumentation )
215+ trace_with ( InspectQueryInstrumentation )
216216 end
217217
218218 unhandled_err_json = '{}'
You can’t perform that action at this time.
0 commit comments