[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#748946: help with sidekiq tests



On Wednesday 20 August 2014 06:30 PM, Cédric Boutillier wrote:
> 
> Hi Praveen,
> 
> On Wed, Aug 20, 2014 at 02:53:35AM +0530, Pirate Praveen wrote:
>> On Thursday 22 May 2014 11:38 PM, Pirate Praveen wrote:
>>> Hi
>>>
>>> I get lots of errors like this,
>>>
>>> 2) Error:
>>> sidekiq web#test_0020_escape job args and error messages:
>>> Errno::ENOENT: No such file or directory @ rb_sysopen -
>>> /usr/lib/ruby/web/views/retries.erb
>>>
>>> web/views/*.erb is actually at the root of the library. If someone
>>> familiar with these templating libraries can have a look it would be
>>> great. It is a matter of installing these in the correct path and
>>> setting it, I guess.
> 
>> I have installed web directory in /usr/share/ruby-sidekiq and patched
>> lib/sidekiq/web.rb to pick this path but there is another problem.
> 
>> The tests are run from lib path where as I remember we had to explicitly
>> add lib directory to load path earlier. it seems to be automatically
>> taken now, what is the rationale for this change?
> 
>> in ruby-tests.rake I have added only tests to the load path.
> 
> The rake/testtask file adds automatically by default the lib/ directory
> to the load_path. Check e.g. line 81 of /usr/lib/ruby/2.1.0/rake/testtask.rb
> Therefore if you ant to add *only* test/, and not "lib", you should
> replace tests.libs by ["test/"] (and not add "test" to that array that
> contains "lib/").
> 
> There was also a missing / from you patch I guess.
> 
> Another thing is that the files in web should be installed in
> usr/share/ruby-sidekiq/ before dh_auto_install, since it's the one
> triggering the tests. So I added to override_dh_auto_install a call
> to dh_install to install web before the tests are run.
> (probably debian/ruby-sidekiq.install isn't needed anymore)
> 
> I pushed these three changes to the team repo. Now the tests in
> test/test_web.rb are passing.
> 
> I still get a random number of test failures coming from other parts
> though. I'll try to have a closer look later.

kill any left out redis process (they don't get killed if the build fails)

now one error and one failure is left

I can get myapp from github but has so many errors so I'm inclined to
disable this test for now. If anyone is interested to get this working,
try it.

I need to look further about the test failure.

# Running:

...........................................................................................E.............................................................................................................................................F......

Fabulous run in 1.318228s, 182.0626 runs/s, 432.3986 assertions/s.

  1) Error:
with cli#test_0003_boots rails:
ArgumentError: ./myapp does not exist

/tmp/buildd/ruby-sidekiq-3.0.0/debian/ruby-sidekiq/usr/lib/ruby/vendor_ruby/sidekiq/cli.rb:207:in
`boot_system'

/tmp/buildd/ruby-sidekiq-3.0.0/debian/ruby-sidekiq/usr/lib/ruby/vendor_ruby/sidekiq/cli.rb:42:in
`parse'
    /tmp/buildd/ruby-sidekiq-3.0.0/test/test_cli.rb:35:in `block (2
levels) in <class:TestCli>'
    /usr/lib/ruby/vendor_ruby/minitest/test.rb:106:in `block (3 levels)
in run'
    /usr/lib/ruby/vendor_ruby/minitest/test.rb:204:in `capture_exceptions'
    /usr/lib/ruby/vendor_ruby/minitest/test.rb:103:in `block (2 levels)
in run'
    /usr/lib/ruby/vendor_ruby/minitest/test.rb:256:in `time_it'
    /usr/lib/ruby/vendor_ruby/minitest/test.rb:102:in `block in run'
    /usr/lib/ruby/vendor_ruby/minitest.rb:317:in `on_signal'
    /usr/lib/ruby/vendor_ruby/minitest/test.rb:276:in `with_info_handler'
    /usr/lib/ruby/vendor_ruby/minitest/test.rb:101:in `run'
    /usr/lib/ruby/vendor_ruby/minitest.rb:759:in `run_one_method'
    /usr/lib/ruby/vendor_ruby/minitest.rb:293:in `run_one_method'
    /usr/lib/ruby/vendor_ruby/minitest.rb:287:in `block (2 levels) in run'
    /usr/lib/ruby/vendor_ruby/minitest.rb:286:in `each'
    /usr/lib/ruby/vendor_ruby/minitest.rb:286:in `block in run'
    /usr/lib/ruby/vendor_ruby/minitest.rb:317:in `on_signal'
    /usr/lib/ruby/vendor_ruby/minitest.rb:306:in `with_info_handler'
    /usr/lib/ruby/vendor_ruby/minitest.rb:285:in `run'
    /usr/lib/ruby/vendor_ruby/minitest.rb:149:in `block in __run'
    /usr/lib/ruby/vendor_ruby/minitest.rb:149:in `map'
    /usr/lib/ruby/vendor_ruby/minitest.rb:149:in `__run'
    /usr/lib/ruby/vendor_ruby/minitest.rb:126:in `run'
    /usr/lib/ruby/vendor_ruby/minitest.rb:55:in `block in autorun'


  2) Failure:
with cli::with config file#test_0004_does not set environment
[/tmp/buildd/ruby-sidekiq-3.0.0/test/test_cli.rb:184]:
Expected: nil
  Actual: "staging"

240 runs, 570 assertions, 1 failures, 1 errors, 0 skips
[Coveralls] Outside the Travis environment, not sending data.
rake aborted!
Command failed with status (1): [ruby -I"test" -I"/usr/lib/ruby/2.1.0"
"/usr/lib/ruby/2.1.0/rake/rake_test_loader.rb" "test/test_api.rb"
"test/test_cli.rb" "test/test_client.rb"
"test/test_exception_handler.rb" "test/test_extensions.rb"
"test/test_fetch.rb" "test/test_manager.rb" "test/test_middleware.rb"
"test/test_processor.rb" "test/test_redis_connection.rb"
"test/test_retry.rb" "test/test_scheduled.rb" "test/test_scheduling.rb"
"test/test_sidekiq.rb" "test/test_testing.rb"
"test/test_testing_fake.rb" "test/test_testing_inline.rb"
"test/test_web.rb" ]
-e:1:in `<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
ERROR: Test "ruby2.1" failed. Exiting.
dh_auto_install: dh_ruby --install
/tmp/buildd/ruby-sidekiq-3.0.0/debian/ruby-sidekiq returned exit code 1
debian/rules:24: recipe for target 'override_dh_auto_install' failed
make[1]: *** [override_dh_auto_install] Error 1
make[1]: Leaving directory '/tmp/buildd/ruby-sidekiq-3.0.0'
debian/rules:15: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit
status 2
E: Failed autobuilding of package
I: unmounting /home/pravi/forge/debian/pbuilder/ccache filesystem
I: unmounting dev/pts filesystem
I: unmounting run/shm filesystem
I: unmounting proc filesystem
I: cleaning the build env
I: removing directory /home/pravi/forge/debian/pbuilder/build/2099 and
its subdirectories

> Cheers,
> 
> Cédric
> 
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: