Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting testSuite to run on JRuby #11700

Closed
gaurish opened this issue Aug 1, 2013 · 26 comments
Closed

Getting testSuite to run on JRuby #11700

gaurish opened this issue Aug 1, 2013 · 26 comments
Labels

Comments

@gaurish
Copy link
Contributor

gaurish commented Aug 1, 2013

As lots of people use JRuby in Production, it might be a good idea if Rails testsuite gets run on JRUBY after every commit to ensure reliability & feature parity with MRI. But we far away from there because currently the testsuite doesn't run at all on JRuby.

so, opening this issue to track/collaborate with others on getting testsuite running on JRuby.

@vipulnsward
Copy link
Member

👍

@pftg
Copy link
Contributor

pftg commented Aug 1, 2013

debugging on VisualVM is Awesome! 💟 wish MRI has something similar

RubyMine has some sort of features for debugging Ruby applications.

@prathamesh-sonpatki
Copy link
Member

@arunagw had pushed jruby-tests branch some time back which runs only JRuby tests. It can be used for this purpose.

@arunagw
Copy link
Member

arunagw commented Aug 1, 2013

Yep there is branch called jruby-tests which is running only JRuby tests on travis, It's will be great if we can get Rails tests passes under JRuby. I would love to help in that.

If you have added patch in Rails which makes any test green with JRuby and also works on MRI then you can open a PR and happy to review that, it's like one by one step.

thanks

@steveklabnik
Copy link
Member

Can you open a PR for your first [x]? This issue is kind of a weird one, where it's not exactly a bug but not exactly not a bug. I don't mind leaving it open as long as some kind of progress is being made through PRs and such, to let people know what they can do to help. But it should be in small chunks, not just one big 'make JRuby work'.

@headius
Copy link
Contributor

headius commented Aug 1, 2013

👍

@anildigital
Copy link
Contributor

👍 I agree that lots of companies use JRuby and Rails in production.

@steveklabnik
Copy link
Member

@anildigital to be clear: we consider any bugs on JRuby to be real bugs that need fixed, we just don't actively run the test suite against JRuby.

@anildigital
Copy link
Contributor

@steveklabnik So do you mean we will continue to not run the test suite against JRuby and do fixes only by PR to Rails? I think what @gaurish is trying to say that we should run the test suite again JRuby. Am I right @gaurish? /cc @headius

@gaurish
Copy link
Contributor Author

gaurish commented Aug 1, 2013

On US-ASCII encoding error in ActiveSupport, I tried everything I knew about encoding but JRuby refused to apply UTF-8. so after drawing blanks, I reported it to the JRuby Bug Tracker & it turns out to be an edgecase bug in encoding.Thomas was kind enough to suggest the following workaround:

fwiw, this error will only bite you if you are creating non-ascii method names and then using reflective methods which return symbols. If I change that activesupport test and use 'rand' instead of the string with multibyte chars the test runs to completion.

thoughts?

@anildigital
Actually, there is more to that. Currently,even if Rails Team is willing the test suite does NOT run against JRuby. so we first need to fix those broken tests. This Issue & upcoming PRs, I will try to do that. If anyone want to help to make sure JRuby runs better on rails, you are more than welcome :)

@arunagw @steveklabnik
Sure, will submit a PR once I can get tests green under JRuby + MRI.

@steveklabnik
Copy link
Member

@gaurish what I'm saying is feel free to submit partial pull requests, the entire thing doesn't have to be green before we can introduce some fixes. Big PRs are harder to review.

@anildigital we can't even consider running the tests on JRuby until they are all green and work. Once they do, we'll have the discussion; I think previously we said we'd like to if Travis gives the okay, which they since have, but that we'd make an actual decision about this once it was even possible.

All of this goes equally for Rubinius as well.

@rafaelfranca
Copy link
Member

Lets do some things here.

  1. Enable travis to run test with jruby but accepting failures.
  2. do smallers pull requests with fixes to these failures.

A long living issue/pull request is not good for the Rails project. That said I'll closed this issue but please lets address these two points above.

@guilleiguaran
Copy link
Member

agree with @rafaelfranca a big PR for this can't be a good idea 😃

@rafaelfranca
Copy link
Member

Enabled jruby on master a840e5f

I'll see how travis will behaves and apply on others branch if everything is fine

@steveklabnik
Copy link
Member

@rafaelfranca can/should we do Rubinius too? I know that there has been a little bit of work towards it too.

@arunagw
Copy link
Member

arunagw commented Aug 1, 2013

and then this can be closed #6264 😄

@rafaelfranca
Copy link
Member

@steveklabnik I think we should. I'm waiting to see the build time with jruby and will enable rbx too.

@guilleiguaran
Copy link
Member

@steveklabnik I think we need to ask to TravisCI guys if the servers can support the load of another additional ruby 😄

@rafaelfranca
Copy link
Member

@guilleiguaran, @joshk said travis is ready. #6264 (comment)

@rafaelfranca
Copy link
Member

rbx enabled on 1dcd187

@gaurish
Copy link
Contributor Author

gaurish commented Aug 1, 2013

@steveklabnik
Pointed Noted. Smaller PR are better 👌

atambo added a commit to atambo/rails that referenced this issue Aug 2, 2013
Hopefully the first of many related to rails#11700.

With these changes the railties tests wont 100% pass but at least they
will run and show the errors.

The first problem was the @method_name variable was never set.
This was causing ENV["ISOLATION_TEST"] to always be nil which
would cause the test output to never be written to the tempfile.

The second problem was that an invalid -t option was being passed
to minitest and minitest was erroring out.

The third problem was the run method needs to always return an
instance of the test class it is trying to isolate. We were returning
a ProxyTestResult instead.
@sobrinho
Copy link
Contributor

Hey guys, I will take a look on failures at railties on jruby ;)

@robin850
Copy link
Member

robin850 commented May 3, 2014

Hi @sobrinho, thanks a lot for your help but I plan to work on getting the test suite to run on JRuby and Rubinius as part of my GSoC this year. :-)

@sobrinho
Copy link
Contributor

sobrinho commented May 5, 2014

@robin850 good to know that, go for it!

@gaurish
Copy link
Contributor Author

gaurish commented May 5, 2014

@robin850 Great. this would give a major push to an effort we started 9months ago as you will be able to work full time on this. Glad to head this 👍

@bf4
Copy link
Contributor

bf4 commented Nov 13, 2014

Found a bunch more failures, some are bugs in JRuby. Not sure what to do with them, so made a gist https://gist.github.com/bf4/bfb08415fde03f46601f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests