sebbacon/alaveteli — Issue #410: request_controller_spec.rb:340 eventually fails if run repeatedly
Author: robinhouston
Created: 2012-02-03 16:56:59+00:00
State: open

The sad thing is there are at least two different failure modes:

ActiveRecord::RecordNotFound in 'RequestController when showing one request when handling incoming mail should not cause a reparsing of the raw email, even when the result would be a 404 '
attachment not found part number 2 incoming_message 6
/home/foi-testharness/alaveteli/app/controllers/request_controller.rb:736:in `get_attachment_internal'
/home/foi-testharness/alaveteli/app/controllers/request_controller.rb:688:in `get_attachment_as_html'
/home/foi-testharness/alaveteli/app/controllers/request_controller.rb:650:in `cache_attachments'
/home/foi-testharness/alaveteli/app/controllers/application_controller.rb:100:in `record_memory'
/home/foi-testharness/alaveteli/spec/spec_helper.rb:153:in `process'
./spec/controllers/request_controller_spec.rb:340:
script/spec:10:

NoMethodError in 'RequestController when showing one request when handling incoming mail should not cause a reparsing of the raw email, even when the result would be a 404 '
undefined method `body' for nil:NilClass
./spec/controllers/request_controller_spec.rb:317:
script/spec:10:

This is surely at least one bug either in the test or in the code under test or both. It would be nice to know which!

To reproduce, just run

while script/spec spec/controllers/request_controller_spec.rb:340; do :; done

and wait.