test/pending.rb in openwferu-0.9.15 vs test/pending.rb in openwferu-0.9.16

- old
+ new

@@ -1,24 +1,23 @@ # # a method for checking the number of pending jobs left in the engine # -require 'openwfe/engine/file_persisted_engine' - - module PendingJobsMixin def assert_no_jobs_left - min_jobs = if @engine.is_a?(OpenWFE::CachedFilePersistedEngine) + cname = @engine.class.name + + min_jobs = if cname == 'OpenWFE::CachedFilePersistedEngine' 1 - #elsif @engine.is_a?(OpenWFE::FilePersistedEngine) - # 0 + elsif cname == 'OpenWFE::Extras::CachedDbPersistedEngine' + 1 else 0 end - assert_equal @engine.get_scheduler.pending_job_count, min_jobs + assert_equal min_jobs, @engine.get_scheduler.pending_job_count end end