diff --git a/lib/ruote/storage/base.rb b/lib/ruote/storage/base.rb index 53e3f8ba..26d73dd0 100644 --- a/lib/ruote/storage/base.rb +++ b/lib/ruote/storage/base.rb @@ -278,6 +278,7 @@ def clear # the process. # def remove_process(wfid) + return if wfid.nil? 2.times do # two passes diff --git a/test/functional/storage.rb b/test/functional/storage.rb index bdc21cd6..c6edfe79 100644 --- a/test/functional/storage.rb +++ b/test/functional/storage.rb @@ -580,6 +580,14 @@ def test_remove_process assert_equal 1, @s.get_many('errors').size assert_equal 1, @s.get_trackers['trackers'].size + @s.remove_process(nil) + + assert_equal 6, @s.get_many('expressions').size + assert_equal 1, @s.get_many('schedules').size + assert_equal 1, @s.get_many('workitems').size + assert_equal 1, @s.get_many('errors').size + assert_equal 1, @s.get_trackers['trackers'].size + ensure dboard.shutdown rescue nil end