<< Masa.20111207-check-parallel-importer-oddb_org-migel-importer-ruby193 | 2011 | Masa.20111205-debug-pointer-link-update_price_feeds-odba-data-corruption-oddb_org >>
Problem
Commit
the number of tests and assertions should be more
)
1) Failure: test_export_yaml__on_thursday(ODDB::TestExporter) [/usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/validators.rb:40:in `validate' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:123:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:64:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:76:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:74:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:41:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:32:in `flexmock_teardown' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/test_unit_integration.rb:37:in `teardown']: in mock 'flexmock(FlexMock)': method 'export_doctors()' called incorrect number of times. <1> expected but was <0>. 2) Failure: test_export_yaml__on_tuesday(ODDB::TestExporter) [/usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/validators.rb:40:in `validate' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:123:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:64:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:76:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:74:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:41:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:32:in `flexmock_teardown' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/test_unit_integration.rb:37:in `teardown']: in mock 'flexmock(FlexMock)': method 'export_fachinfos()' called incorrect number of times. <1> expected but was <0>. 3) Failure: test_export_yaml__on_wednesday(ODDB::TestExporter) [/usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/validators.rb:40:in `validate' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:123:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:64:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:76:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:74:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:41:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:32:in `flexmock_teardown' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/test_unit_integration.rb:37:in `teardown']: in mock 'flexmock(FlexMock)': method 'export_patinfos()' called incorrect number of times. <1> expected but was <0>. 4) Failure: test_run__on_15th_day(ODDB::TestExporter) [/usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/validators.rb:40:in `validate' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:123:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:64:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:76:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:74:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:41:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:32:in `flexmock_teardown' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/test_unit_integration.rb:37:in `teardown']: in mock 'flexmock(ODDB::Exporter)': method 'export_oddbdat()' called incorrect number of times. <1> expected but was <0>. 5) Failure: test_run__on_1st_day(ODDB::TestExporter) [/usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/validators.rb:40:in `validate' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:123:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:64:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:76:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:74:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:41:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:32:in `flexmock_teardown' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/test_unit_integration.rb:37:in `teardown']: in mock 'flexmock(ODDB::Exporter)': method 'export_oddbdat()' called incorrect number of times. <1> expected but was <0>. 6) Failure: test_run__on_sunday(ODDB::TestExporter) [/usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/validators.rb:40:in `validate' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:123:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation.rb:122:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:64:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/expectation_director.rb:63:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:76:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:75:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:74:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:41:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `each' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:40:in `flexmock_verify' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/mock_container.rb:32:in `flexmock_teardown' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/test_unit_integration.rb:37:in `teardown']: in mock 'flexmock(ODDB::Exporter)': method 'export_oddbdat()' called incorrect number of times. <1> expected but was <0>. 7) Failure: test_update_swissmedic_followers(ODDB::TestUpdater) [/home/masa/ywesee/oddb.org/test/test_util/updater.rb:615]: <"mail_swissmedic_notifications"> expected but was <nil>.
Error
masa@masa ~/ywesee/oddb.org $ ruby test/test_state/admin/login.rb /usr/lib64/ruby/site_ruby/1.8/htmlgrid/grid.rb:27: warning: already initialized constant VERSION /usr/lib64/ruby/1.8/e2mmap.rb:51: Use Ruby 1.1 (RuntimeError) from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib64/ruby/1.8/matrix.rb:23 from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib64/ruby/gems/1.8/gems/gd2-1.1.1/lib/gd2/canvas.rb:23 from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' ... 48 levels... from /home/masa/ywesee/oddb.org/src/state/admin/login.rb:5 from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from test/test_state/admin/login.rb:9
#fail "Use Ruby 1.1" if VERSION < "1.1"
fail "Use Ruby 1.1" if RUBY_VERSION < "1.1"
1) Error: test_new_sequence(ODDB::State::Admin::TestCompanyRegistration): NoMethodError: undefined method `persistent_user_input' for <FlexMock:session>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/state/admin/registration.rb:145:in `new_sequence' /home/masa/ywesee/oddb.org/src/state/admin/registration.rb:221:in `new_sequence' /home/masa/ywesee/oddb.org/test/test_state/admin/registration.rb:338:in `test_new_sequence' 2) Error: test_new_sequence(ODDB::State::Admin::TestRegistration): NoMethodError: undefined method `persistent_user_input' for <FlexMock:session>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/state/admin/registration.rb:145:in `new_sequence' /home/masa/ywesee/oddb.org/test/test_state/admin/registration.rb:185:in `test_new_sequence' 3) Error: test_new_sequence__resolve_state(ODDB::State::Admin::TestRegistration): NoMethodError: undefined method `persistent_user_input' for <FlexMock:session>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/state/admin/registration.rb:145:in `new_sequence' /home/masa/ywesee/oddb.org/test/test_state/admin/registration.rb:197:in `test_new_sequence__resolve_state' 4) Error: test_resolve__else_package(ODDB::State::TestGlobal): NoMethodError: undefined method `set_persistent_user_input' for #<ODDB::State::TestGlobal::StubSession:0x7f0944971798> /home/masa/ywesee/oddb.org/src/state/global.rb:607:in `resolve' /home/masa/ywesee/oddb.org/test/test_state/global.rb:582:in `test_resolve__else_package' 5) Error: test_resolve__else_registration(ODDB::State::TestGlobal): NoMethodError: undefined method `set_persistent_user_input' for #<ODDB::State::TestGlobal::StubSession:0x7f0944938ee8> /home/masa/ywesee/oddb.org/src/state/global.rb:607:in `resolve' /home/masa/ywesee/oddb.org/test/test_state/global.rb:632:in `test_resolve__else_registration' 6) Error: test_resolve__else_sequence(ODDB::State::TestGlobal): NoMethodError: undefined method `set_persistent_user_input' for #<ODDB::State::TestGlobal::StubSession:0x7f0944918418> /home/masa/ywesee/oddb.org/src/state/global.rb:607:in `resolve' /home/masa/ywesee/oddb.org/test/test_state/global.rb:607:in `test_resolve__else_sequence' 7) Error: test_new_package(TestCompanySequence): NoMethodError: undefined method `persistent_user_input' for <FlexMock:session>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/state/admin/sequence.rb:132:in `new_package' /home/masa/ywesee/oddb.org/src/state/admin/sequence.rb:382:in `new_package' /home/masa/ywesee/oddb.org/test/test_state/admin/sequence.rb:779:in `test_new_package' 8) Error: test_new_package(TestSequence): NoMethodError: undefined method `persistent_user_input' for <FlexMock:session>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/state/admin/sequence.rb:132:in `new_package' /home/masa/ywesee/oddb.org/test/test_state/admin/sequence.rb:289:in `test_new_package' 9) Error: test_new_package__resolve_state(TestSequence): NoMethodError: undefined method `persistent_user_input' for <FlexMock:session>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/state/admin/sequence.rb:132:in `new_package' /home/masa/ywesee/oddb.org/test/test_state/admin/sequence.rb:304:in `test_new_package__resolve_state' 10) Error: test_generic_group(TestPackageForm): NoMethodError: undefined method `iksnr' for <FlexMock:model>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/view/admin/package.rb:234:in `sl_entry' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:85:in `send' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:85:in `create' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:322:in `compose_component' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:239:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `each' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:61:in `init' /home/masa/ywesee/oddb.org/src/view/admin/package.rb:213:in `init' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize' /home/masa/ywesee/oddb.org/test/test_view/admin/package.rb:102:in `new' /home/masa/ywesee/oddb.org/test/test_view/admin/package.rb:102:in `setup' 11) Error: test_init(TestPackageForm): NoMethodError: undefined method `iksnr' for <FlexMock:model>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/view/admin/package.rb:234:in `sl_entry' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:85:in `send' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:85:in `create' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:322:in `compose_component' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:239:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `each' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:61:in `init' /home/masa/ywesee/oddb.org/src/view/admin/package.rb:213:in `init' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize' /home/masa/ywesee/oddb.org/test/test_view/admin/package.rb:102:in `new' /home/masa/ywesee/oddb.org/test/test_view/admin/package.rb:102:in `setup' 12) Error: test_sl_entry(TestPackageForm): NoMethodError: undefined method `iksnr' for <FlexMock:model>:FlexMock /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:105:in `method_missing' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:191:in `flexmock_wrap' /usr/lib64/ruby/gems/1.8/gems/flexmock-0.8.6/lib/flexmock/core.rb:98:in `method_missing' /home/masa/ywesee/oddb.org/src/view/admin/package.rb:234:in `sl_entry' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:85:in `send' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:85:in `create' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:322:in `compose_component' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:239:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `each' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:61:in `init' /home/masa/ywesee/oddb.org/src/view/admin/package.rb:213:in `init' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize' /home/masa/ywesee/oddb.org/test/test_view/admin/package.rb:102:in `new' /home/masa/ywesee/oddb.org/test/test_view/admin/package.rb:102:in `setup'
Final check
4184 tests, 6665 assertions, 0 failures, 0 errors
Commit
Experiment
Run
sudo -u postgres dropdb testdb; sudo -u postgres createdb -E UTF8 -T template0 testdb
Screen shot
Note
ERROR: duplicate key value violates unique constraint "object_pkey" /usr/lib64/ruby/site_ruby/1.8/DBD/Pg/Pg.rb:671:in `execute': ERROR: duplicate key value violates unique constraint "object_pkey" (DBI::ProgrammingError) from /usr/lib64/ruby/site_ruby/1.8/dbi.rb:912:in `execute' from /usr/lib64/ruby/site_ruby/1.8/dbi.rb:917:in `do' from /usr/lib64/ruby/site_ruby/1.8/dbi.rb:520:in `do' from /usr/lib64/ruby/site_ruby/1.8/odba/connection_pool.rb:36:in `send' from /usr/lib64/ruby/site_ruby/1.8/odba/connection_pool.rb:36:in `method_missing' from /usr/lib64/ruby/site_ruby/1.8/odba/connection_pool.rb:26:in `next_connection' from /usr/lib64/ruby/site_ruby/1.8/odba/connection_pool.rb:35:in `method_missing' from /usr/lib64/ruby/site_ruby/1.8/odba/storage.rb:555:in `store' ... 6 levels... from update_odba1.rb:17:in `save' from update_odba1.rb:26 from update_odba1.rb:22:in `times' from update_odba1.rb:22
Result
masa@masa ~/work/test_odba $ ruby check_odba.rb 2 masa1_2 3 masa1_3 4 masa1_4 5 masa1_5 6 masa1_6 7 masa1_7 8 masa1_8 9 masa1_9 10 masa1_10 ... 1943 masa1_1943 1944 masa1_1944 1945 masa1_1945 1946 masa1_1946 1947 masa2_1947 # <= update_odba2.rb starts 1948 masa2_1948 1949 masa2_1949 1950 masa2_1950 1951 masa2_1951 ... 11941 masa2_11941 11942 masa2_11942 11943 masa2_11943 11944 masa2_11944 11945 masa2_11945 11946 masa2_11946
Note
Experiment
Run
masa@masa ~/work/test_odba $ ruby odba_id_test1.rb ERROR: relation "object" already exists ERROR: relation "prefetchable_index" already exists ERROR: relation "extent_index" already exists ERROR: relation "object_connection" already exists ERROR: relation "target_id_index" already exists ERROR: relation "collection" already exists (sleep 10) odba_id=11954
masa@masa ~/work/test_odba $ ruby odba_id_test2.rb ERROR: relation "object" already exists ERROR: relation "prefetchable_index" already exists ERROR: relation "extent_index" already exists ERROR: relation "object_connection" already exists ERROR: relation "target_id_index" already exists ERROR: relation "collection" already exists odba_id=11954
Result
masa@masa ~/work/test_odba $ ruby check_odba.rb ... 11954 masa1_11954
Note
Problems
Design (flock exclusive control)
Problem
Experiment
require 'odba/lock'
... def next_id #id = ODBA.storage.next_idid = new_id
@peers.each do |peer| peer.reserve_next_id id rescue DRb::DRbError end id rescue OdbaDuplicateIdError retry end
Run
Result
masa@masa ~/work/test_odba $ ruby check_odba.rb ... 1856 masa2_86 1857 masa1_13 1858 masa2_86 1859 masa1_13 1860 masa2_86 1861 masa1_13 1862 masa2_86 1863 masa1_13 1864 masa2_86 1865 masa1_13 1866 masa2_86 1867 masa1_13 1868 masa2_86 1869 masa1_13 1870 masa2_86 1871 masa1_13 1872 masa2_86 1873 masa1_13 ...
Note (Problems)
Note (Next)
Experiment (database name)
ch.oddb> ODBA.storage.dbi.instance_variable_get('@dbi_args').first.split(/:/).last -> oddb.org
Experiment
# File lock exclusive control between processes, not threads, to create safely a new odba_id # Sometimes several update jobs (processes) to the same database at the same time LOCK_FILE = '/tmp/lockfile' COUNT_FILE = '/tmp/count' def lock(dbname) lock_file = LOCK_FILE + "." + dbname open(lock_file, 'a') do |st| st.flock(File::LOCK_EX) yield st.flock(File::LOCK_UN) end end def new_id(dbname, odba_storage) count_file = COUNT_FILE + "." + dbname unless File.exist?(count_file) open(count_file, "w") do |out| out.print odba_storage.max_id end end count = nil lock(dbname) do count = File.read(count_file).to_i count += 1 open(count_file, "w") do |out| out.print count end end odba_storage.update_max_id(count) count end
# Returns the next valid odba_id def next_id #id = ODBA.storage.next_iddbname = ODBA.storage.dbi.dbi_args.first.split(/:/).last
id = new_id(dbname, ODBA.storage)
@peers.each do |peer| peer.reserve_next_id id rescue DRb::DRbError end id rescue OdbaDuplicateIdError retry end
#attr_reader :connections
attr_reader :connections, :dbi_args
def update_max_id(id) @id_mutex.synchronize do @next_id = id end end
Run
Result
masa@masa ~/work/test_odba $ ruby update_odba1.rb ... masa.name = masa1_1927 odba_id=1928 masa.name = masa1_1929 odba_id=1930 masa.name = masa1_1931 odba_id=1932 masa.name = masa1_1933 odba_id=1934 masa.name = masa1_1935 odba_id=1936 masa.name = masa1_1937 odba_id=1938
masa@masa ~/work/test_odba $ ruby update_odba2.rb ... masa.name = masa2_1997 odba_id=1997 masa.name = masa2_1998 odba_id=1998 masa.name = masa2_1999 odba_id=1999 masa.name = masa2_2000 odba_id=2000 masa.name = masa2_2001 odba_id=2001
Note
Experiment
Result
masa@masa ~/work/test_odba $ ruby update_odba1.rb ... masa.name = masa1_981 odba_id=981 masa.name = masa1_983 odba_id=983 masa.name = masa1_985 odba_id=985 masa.name = masa1_987 odba_id=987
masa@masa ~/work/test_odba $ ruby update_odba2.rb ... masa.name = masa2_998 odba_id=998 masa.name = masa2_999 odba_id=999 masa.name = masa2_1000 odba_id=1000 masa.name = masa2_1001 odba_id=1001