Forum: JRuby Minitest / JRuby issue

06eac631460b22ff6c635e770e206a58?d=identicon&s=25 Peter M. Goldstein (Guest)
on 2013-11-27 04:06
(Received via mailing list)
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:

https://github.com/seattlerb/minitest/blob/ccba6a7...
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
8db112f19ce0a69c7e490bbf27256346?d=identicon&s=25 Tobias Pfeiffer (Guest)
on 2013-12-02 22:05
(Received via mailing list)
-----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:
https://travis-ci.org/mperham/sidekiq/jobs/14777335

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 :-(

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-----
06eac631460b22ff6c635e770e206a58?d=identicon&s=25 Peter M. Goldstein (Guest)
on 2013-12-02 22:11
(Received via mailing list)
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 Pfeiffer <pragtob@gmail.com>
Date: Mon, Dec 2, 2013 at 1:03 PM
Subject: Re: [jruby-user] Minitest / JRuby issue
To: user@jruby.codehaus.org


-----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:
https://travis-ci.org/mperham/sidekiq/jobs/14777335

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 :-(

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:
>
>
https://github.com/seattlerb/minitest/blob/ccba6a7...
> 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-----
8db112f19ce0a69c7e490bbf27256346?d=identicon&s=25 Tobias Pfeiffer (Guest)
on 2013-12-02 22:26
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bug report filed here: https://github.com/jruby/jruby/issues/1291

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-----
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.