Skip to content

Commit ee43808

Browse files
committed
Fix: Clear @ci_queue_requeued on DUP to allow proper finish
When dup.mark_as_requeued! is called, the DUP inherits @ci_queue_requeued=true from the original. This caused the DUP to skip calling super(reporter) in finish, leaving execution_result.run_time as nil. The JUnit formatter then failed when trying to format the duration. Now we explicitly clear @ci_queue_requeued in mark_as_requeued! so the DUP goes through the normal finish flow.
1 parent 7466966 commit ee43808

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ruby/lib/rspec/queue.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ def mark_as_requeued!(reporter)
183183
STDERR.puts "[CI-QUEUE DEBUG] mark_as_requeued!: Called for '#{id}' (this is a DUP for display purposes)"
184184
STDERR.flush
185185

186+
# Clear the requeued flag since this is a DUP for display purposes.
187+
# The DUP inherits instance variables from the original, but we need
188+
# this DUP to go through the normal finish flow to get proper metadata.
189+
@ci_queue_requeued = nil
190+
186191
@metadata = @metadata.dup # Avoid mutating the @metadata hash of the original Example instance
187192
@metadata[:execution_result] = execution_result.dup
188193

0 commit comments

Comments
 (0)