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

- old
+ new

@@ -22,16 +22,32 @@ $WORKFLOW_ENGINE_CLASS = Engine persistence = ENV["__persistence__"] -require "openwfe/engine/file_persisted_engine" if persistence if persistence == "pure-persistence" + + require "openwfe/engine/file_persisted_engine" $WORKFLOW_ENGINE_CLASS = FilePersistedEngine + elsif persistence == "cached-persistence" + + require "openwfe/engine/file_persisted_engine" $WORKFLOW_ENGINE_CLASS = CachedFilePersistedEngine + +elsif persistence == "db-persistence" + + require 'extras/active_connection' + require 'openwfe/extras/engine/db_persisted_engine' + $WORKFLOW_ENGINE_CLASS = OpenWFE::Extras::DbPersistedEngine + +elsif persistence == "cached-db-persistence" + + require 'extras/active_connection' + require 'openwfe/extras/engine/db_persisted_engine' + $WORKFLOW_ENGINE_CLASS = OpenWFE::Extras::CachedDbPersistedEngine end puts puts "testing with engine of class " + $WORKFLOW_ENGINE_CLASS.to_s @@ -196,12 +212,12 @@ purge_engine end assert_equal( - size, 1, + size, "there are expressions remaining in the expression pool " + "(#{exp_storage.length})") fei end @@ -211,17 +227,23 @@ @engine.get_expression_storages.each do |storage| storage.purge end end + def assert_trace (desired_trace) + + assert_equal desired_trace, @tracer.to_s + end + end # # A bunch of methods for testing the journal component # module JournalTestBase def get_journal + @engine.get_journal end def get_error_count (wfid)