Currently when the error threshold is reached, the remaining rows are still processed (see test-case below).
I believe the original intent was to stop processing remaining rows, reading the code.
require File.dirname(__FILE__) + '/test_helper'
class EngineTest < Test::Unit::TestCase
context 'process' do
should 'stop as soon as the error threshold is reached' do
engine = ETL::Engine.new
assert_equal 0, engine.errors.size
engine.process ETL::Control::Control.parse_text <<CTL
set_error_threshold 1
source :in, { :type => :enumerable, :enumerable => (1..100) }
after_read { |row| raise "Failure" }
CTL
# will fail because engine.errors.size is 100
assert_equal 1, engine.errors.size
end
end
end
Currently when the error threshold is reached, the remaining rows are still processed (see test-case below).
I believe the original intent was to stop processing remaining rows, reading the code.