Minitest / JRuby issue

I’m trying to get the Sidekiq specs running green under JRuby 1.7.8 and
I’m
seeing a somewhat obscure error in a MiniTest (4.7.5) mock. I’m getting
the following:

  1. Error:
    manager#test_0002_assigns work to a processor:
    NoMethodError: unmocked method :==, expected one of []
    org/jruby/RubyArray.java:1957:in ==' org/jruby/RubyHash.java:1069:in ==’
    org/jruby/RubyArray.java:1303:in include?' org/jruby/RubyArray.java:1613:in each’
    org/jruby/RubyHash.java:1338:in `each’

/Users/peter/Development/apps/petergoldstein/sidekiq/test/test_manager.rb:24:in
test_0002_assigns work to a processor' org/jruby/RubyArray.java:2413:in map’
org/jruby/RubyArray.java:2413:in map' org/jruby/RubyArray.java:1613:in each’

The spec runs cleanly under MRI.

I’m trying to understand the issue, and whether this is something that
needs to be resolved on the JRuby side or on the MiniTest side.

From what I can tell it looks like the issue is how equality is being
invoked on the member objects in the JRuby implementation of ‘==’ on
RubyArray. It seems to be using the ‘==’ method, which is not
explicitly
mocked, and in fact causes an error when directly invoked.

Does ‘==’ need to be included in ‘overridden_methods’ as defined here:

Is there another change on the MiniTest side that is required? Or is
this
something that needs to be resolved on the JRuby side?

Any insight would be appreciated. Thanks.

Best,

Peter

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

sorry no real help from my side but it seems to be a JRuby bug, which
should be filed on github (new release is incoming Wednesday or so I
believe).

This also fails on Travis for the sidekiq specs, see here:

Peter do you wanna file that bug or shall I?

Thanks for reporting!

Cheers,
Tobi

PS: Sorry to see that sidekiq has JRuby and rubinius under allowed
failures :frowning:

On Wed 27 Nov 2013 04:05:15 AM CET, Peter M. Goldstein wrote:

org/jruby/RubyArray.java:1613:in `each'

I’m trying to understand the issue, and whether this is something that
Is there another change on the MiniTest side that is required? Or is
this something that needs to be resolved on the JRuby side?

Any insight would be appreciated. Thanks.

Best,

Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSnPWpAAoJEBzX32BGBaITZQEIALvt5YqYRbKxiEfkt1tYzGKU
sbEmOnQE1olt28XmlnHaGonzrde+mzlZOO4dS6deKBkgaxWkjpBLpwCOOIOPJOP4
AoFwoNiVk3mKzplNOM0757ZHG8Hk6EQVr180seyYKhhe68HVTmHK0q+OfVJdwtPz
Fi7e/DGhEhdx19to3qqSgKJBDC6egS06YM8XOpr8atSFyXCL6twvg1WC9NSdRIM3
BNm2WNG/TkV9Xc9pgyH7XdLS4IImddWpK+HMtmOrkCXdk5bTws7ypkwQNmDHfr6f
yaSPJAuh4zYE1AoUhe9AU6RfoUh3EpNxpwSJ/FbW8KScyFnyRlv0IA56sGXkYjs=
=W4V4
-----END PGP SIGNATURE-----

Hi Tobi,

Would you mind filing the bug against JRuby?

Thanks.

Best,

Peter

P.S.: Yep, I’m trying to justify moving JRuby and Rubinius out of the
allowed failures. But this issue needs to be fixed first.

---------- Forwarded message ----------
From: Tobias P. [email protected]
Date: Mon, Dec 2, 2013 at 1:03 PM
Subject: Re: [jruby-user] Minitest / JRuby issue
To: [email protected]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

sorry no real help from my side but it seems to be a JRuby bug, which
should be filed on github (new release is incoming Wednesday or so I
believe).

This also fails on Travis for the sidekiq specs, see here:

Peter do you wanna file that bug or shall I?

Thanks for reporting!

Cheers,
Tobi

PS: Sorry to see that sidekiq has JRuby and rubinius under allowed
failures :frowning:

On Wed 27 Nov 2013 04:05:15 AM CET, Peter M. Goldstein wrote:

org/jruby/RubyArray.java:1613:in `each'
org/jruby/RubyHash.java:1338:in `each'

/Users/peter/Development/apps/petergoldstein/sidekiq/test/test_manager.rb:24:in

From what I can tell it looks like the issue is how equality is being
invoked on the member objects in the JRuby implementation of ‘==’ on
RubyArray. It seems to be using the ‘==’ method, which is not
explicitly mocked, and in fact causes an error when directly invoked.

Does ‘==’ need to be included in ‘overridden_methods’ as defined here:

Is there another change on the MiniTest side that is required? Or is
this something that needs to be resolved on the JRuby side?

Any insight would be appreciated. Thanks.

Best,

Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSnPWpAAoJEBzX32BGBaITZQEIALvt5YqYRbKxiEfkt1tYzGKU
sbEmOnQE1olt28XmlnHaGonzrde+mzlZOO4dS6deKBkgaxWkjpBLpwCOOIOPJOP4
AoFwoNiVk3mKzplNOM0757ZHG8Hk6EQVr180seyYKhhe68HVTmHK0q+OfVJdwtPz
Fi7e/DGhEhdx19to3qqSgKJBDC6egS06YM8XOpr8atSFyXCL6twvg1WC9NSdRIM3
BNm2WNG/TkV9Xc9pgyH7XdLS4IImddWpK+HMtmOrkCXdk5bTws7ypkwQNmDHfr6f
yaSPJAuh4zYE1AoUhe9AU6RfoUh3EpNxpwSJ/FbW8KScyFnyRlv0IA56sGXkYjs=
=W4V4
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bug report filed here: Sidekiq - Minitest error: NoMethodError: unmocked method :==, expected one of [] · Issue #1291 · jruby/jruby · GitHub

Would be cool if you add yourself to that issue (e.g. comment on it or
something) as you probably know the problem better than I do (also
please verify that what I wrote is correct).

Cheers and thanks,
Tobi

On Mon 02 Dec 2013 10:10:29 PM CET, Peter M. Goldstein wrote:

-----BEGIN PGP SIGNED MESSAGE-----

On Wed 27 Nov 2013 04:05:15 AM CET, Peter M. Goldstein wrote:

org/jruby/RubyArray.java:1613:in `each'

Version: GnuPG v1.4.14 (GNU/Linux)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSnPp4AAoJEBzX32BGBaITWnAIALnZJDYM7vuGknJ3wZpBbKxD
vsbfxfdyNnL0SCzhR+JGyaehgvDhIaA6ML3FZFE6yI2EDc3lU3WFcnmn/jRAkG57
vjDdPGVCG1iDEo18GRDd7HsrAtbf1QrorGYgHK92lORiSTiGBsT14U6G5VMISdOi
/hYvbFAA7QqbrRZw9dsLy8lAxa2yw1antJ1k7hiaig2khF+8k5mS6uxveoTBFVHX
rCNmoxKMzob+IeOH5/FZHpp8ML2s51t9RtjIE+QdWU8xzPQD7HRYqpAQEX2Se5EM
LDHvZ1/ONo/APXxG6d00nQp/vUAHJ6TQpmmvGbNlA0OzFIzILNwtL1hJP1VKCyg=
=XR4S
-----END PGP SIGNATURE-----