Hello everyone,
As Gonzalo wrote in his last post, I've been coding some participants
based on ruote's ArParticipant. Since it's too soon for us to switch
to Ruote 2.0/ruote-kit -at least until or next release-, I'd like to
test my enhancements under ruote 0.9.20's test framework. Mainly using
"test/functional/db_ft_0_ar_participants.rb" as a template. But before
testing my code, I decided to make sure that this functional test
actually gets executed without problems for the vanilla ArParticipant.
After configuring "test/ar_test_connection.rb":
(set up db connection and commented out references to deprecated
active_participants")
And just focusing on "DbFtArParticipantsTest" , I run "rake test
TEST=test/functional/db_ft_0_ar_participants.rb". Shortly after that,
an exeception appears at "logs/ruote.log":
===== BEGIN exception ====
OpenWFE::ExpressionPool 's_expression_pool' - s_expression_pool
operation :apply on (fei 0.9.21 engine field:__definition test 0
20090831-ketatzugasa alpha 0.0.0) failed with
exception : can't dump anonymous class Class
/usr/lib/ruby/1.8/yaml/rubytypes.rb:6:in `to_yaml'
/usr/lib/ruby/1.8/yaml/rubytypes.rb:41:in `node_export'
/usr/lib/ruby/1.8/yaml/rubytypes.rb:41:in `add'
/usr/lib/ruby/1.8/yaml/rubytypes.rb:41:in `to_yaml'
/usr/lib/ruby/1.8/yaml/rubytypes.rb:40:in `each'
/usr/lib/ruby/1.8/yaml/rubytypes.rb:40:in `to_yaml'
/usr/lib/ruby/1.8/yaml/rubytypes.rb:39:in `map'
/usr/lib/ruby/1.8/yaml/rubytypes.rb:39:in `to_yaml'
/usr/lib/ruby/1.8/yaml.rb:391:in `call'
/usr/lib/ruby/1.8/yaml.rb:391:in `emit'
/usr/lib/ruby/1.8/yaml.rb:391:in `quick_emit'
/usr/lib/ruby/1.8/yaml/rubytypes.rb:38:in `to_yaml'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
connection_adapters/abstract/quoting.rb:31:in `quote'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
connection_adapters/mysql_adapter.rb:233:in `quote'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:
2986:in `attributes_with_quotes'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:
2977:in `each'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:
2977:in `attributes_with_quotes'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:
2892:in `create_without_timestamps'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
timestamp.rb:29:in `create_without_callbacks'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
callbacks.rb:266:in `create'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:
2868:in `create_or_update_without_callbacks'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
callbacks.rb:250:in `create_or_update'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:
2556:in `save_without_validation!'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
validations.rb:1019:in `save_without_dirty!'
/var/lib/gems/1.8/gems/activerecord-2.3.2/lib/active_record/dirty.rb:
87:in `save_without_transactions_without_cleanup_connection!'
(eval):4:in `save_without_transactions!'
==== END exception ====
So it seems ArWorkitem cannot be persisted, probably because of one of
its attributes being malformed. After commenting in and out each
attribute at "ArWorkitemWorkitem.from_owfe_workitem", it appears that
"arwi.store_name = store_name" holds a scary value:
==begin==
{:application_context=>
{:s_error_journal=>#<OpenWFE::InMemoryErrorJournal:0xb6600e6c
@application_context={...}, @per_processes={},
@service_name=:s_error_journal, @observers=[#<Proc:0xb79f91f8@/home/
nando/development/BlueMountain/Common/Server/ruote-rest/vendor/ruote/
lib/openwfe/expool/errorjournal.rb:137>, #<Proc:0xb79f885c@/home/nando/
development/BlueMountain/Common/Server/ruote-rest/vendor/ruote/lib/
openwfe/expool/errorjournal.rb:151>]
>, :ruby_eval_allowed=>true, :s_wfid_generator=>#<OpenWFE::KotobaWfidGenerator:
0xb6601b78 @last=12517409573051, @last_f=#<File:work/wfidgen.last>,
@last_fn="work/wfidgen.last", @application_context={...}
....
....more verbosity...
....
:update=>[#<Proc:0xb7a0cdd4@/home/nando/development/BlueMountain/
Common/Server/ruote-rest/vendor/ruote/lib/openwfe/expool/expstorage.rb:
47>]}, @paused_instances={}
>, :s_scheduler=>#<Rufus::Scheduler::PlainScheduler:0xb667ec04
@frequency=0.33, @thread=#<Thread:0xb667eb8c sleep>,
@jobs=#<Rufus::Scheduler::JobQueue:0xb667ebdc @jobs=[], @mutex=#<Mutex:
0xb667ebb4>>, @cron_jobs=#<Rufus::Scheduler::CronJobQueue:0xb667ebc8
@jobs={}, @mutex=#<Mutex:0xb667eb78>>, @options={:thread_name=>"rufus
scheduler for Ruote (engine -617344558)"}
>}, :participant=>OpenWFE::Extras::ArParticipant, :regex=>"alpha"}
==end==
I'd say, it might be the whole @application_context that gets tangled
with the humble store_name? Moreover, when I comment out the variable
assignation, the problem disappears and the test runs OK. It's not
that we use store_name in our daily work, but I tought this issue
could be interesting.
Kindest regards,
//nando
--~--~---------~--~----~------------~-------~--~----~
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---