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

Skip tests that do not run on JRuby #969

Merged
merged 3 commits into from Feb 10, 2020
Merged

Skip tests that do not run on JRuby #969

merged 3 commits into from Feb 10, 2020

Conversation

olleolleolle
Copy link
Member

@olleolleolle olleolleolle commented Apr 8, 2019

Add RSpec skips to test cases that can not run on JRuby.

Description

There are adapters that do not support JRuby.

This is about investigating a JRuby build for the CI.

We do not have a maintainer which can work focused with JRuby, right now, so we want to keep it in there, but not as a required job.

Todos

  • Be sure that the desired behavior is achieved.
  • Investigate and write up Invalid header type
  • Turn this into GitHub Action format (future)

@olleolleolle
Copy link
Member Author

olleolleolle commented Apr 8, 2019

https://circleci.com/gh/lostisland/faraday/355

Invalid header type

in the RubyParser.java. I have seen this failure mode before!

Example

  527) Faraday::Adapter::EMSynchrony behaves like an adapter with SSL disabled #options behaves like a request method represents empty body response as blank string
       Got 1 failure and 1 other error:
       Shared Example Group: "a request method" called from ./spec/support/shared_examples/adapter.rb:84
       Shared Example Group: "adapter examples" called from ./spec/support/shared_examples/adapter.rb:13
       Shared Example Group: "an adapter" called from ./spec/faraday/adapter/em_synchrony_spec.rb:7

       527.1) Failure/Error: block = -> { request.send(http_method, request_config(env)) }
              
              ArgumentError:
                Invalid header value type
              # org/ruby_http_parser/RubyHttpParser.java:478:in `header_value_type='
              # ./vendor/bundle/jruby/2.5.0/gems/em-http-request-1.1.5/lib/em-http/http_connection.rb:115:in `post_init'
              # ./vendor/bundle/jruby/2.5.0/gems/webmock-3.5.1/lib/webmock/http_lib_adapters/em_http_request_adapter.rb:60:in `activate_connection'
              # ./vendor/bundle/jruby/2.5.0/gems/em-http-request-1.1.5/lib/em-http/http_connection.rb:92:in `setup_request'
              # (eval):6:in `options'
              # ./lib/faraday/adapter/em_synchrony.rb:97:in `block in execute_single_request'
              # ./lib/faraday/adapter/em_synchrony.rb:127:in `block in call_block'

https://github.com/igrigorik/em-http-request/blob/v1.1.5/lib/em-http/http_connection.rb#L115

The http_parser.rb dep is picked up like:

s.add_dependency 'http_parser.rb', '>= 0.6.0' which became

Fetching http_parser.rb 0.6.0 (java) in the Gemfile.

I had seen it before: tmm1/http_parser.rb#42

@olleolleolle olleolleolle changed the title Add JRuby 9.2 to CI matrix Add JRuby 9.2 to CI matrix (investigating) Apr 8, 2019
@technoweenie
Copy link
Member

Ah, good ole header_value_type. I'm not sure what else it would be... :mixed looks like a fine value.

https://github.com/tmm1/http_parser.rb/blob/ec53181a4c944f8c308830b84b08fc8f71075ba6/ext/ruby_http_parser/org/ruby_http_parser/RubyHttpParser.java#L477-L479

@olleolleolle
Copy link
Member Author

olleolleolle commented Aug 9, 2019

OK, the failing CI run on jruby92 is upload to Coverage website. Hm!

Coverage (83.25%) is below the expected minimum coverage (84.00%).
Exited with code 2

Finished in 21.12 seconds (files took 3.88 seconds to load)
2135 examples, 0 failures

Randomized with seed 40914

Coverage report generated for RSpec to /home/circleci/project/coverage. 1834 / 2203 LOC (83.25%) covered.
[Coveralls] Submitting to https://coveralls.io/api/v1
Coveralls encountered an exception:
EOFError
End of file reached
org/jruby/ext/openssl/SSLSocket.java:701:in sysclose' /home/circleci/project/vendor/bundle/jruby/2.5.0/gems/jruby-openssl-0.8.10/lib/1.9/openssl/buffering.rb:447:in close'
/opt/jruby/lib/ruby/stdlib/net/http.rb:1000:in connect' /opt/jruby/lib/ruby/stdlib/net/http.rb:924:in do_start'
/opt/jruby/lib/ruby/stdlib/net/http.rb:913:in start' /opt/jruby/lib/ruby/stdlib/net/http.rb:1465:in request'
/home/circleci/project/vendor/bundle/jruby/2.5.0/gems/coveralls-0.8.22/lib/coveralls/api.rb:29:in post_json' /home/circleci/project/vendor/bundle/jruby/2.5.0/gems/coveralls-0.8.22/lib/coveralls/simplecov.rb:64:in format'
/home/circleci/project/vendor/bundle/jruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/formatter/multi_formatter.rb:10:in block in format' org/jruby/RubyArray.java:2577:in map'
/home/circleci/project/vendor/bundle/jruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/formatter/multi_formatter.rb:8:in format' /home/circleci/project/vendor/bundle/jruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/result.rb:48:in format!'
/home/circleci/project/vendor/bundle/jruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/configuration.rb:182:in block in at_exit' /home/circleci/project/vendor/bundle/jruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov.rb:200:in run_exit_tasks!'
/home/circleci/project/vendor/bundle/jruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/defaults.rb:27:in `block in

'
Coverage (83.25%) is below the expected minimum coverage (84.00%).
Exited with code 2

@olleolleolle olleolleolle force-pushed the jruby-in-ci branch 2 times, most recently from cf8a097 to 0bfbb34 Compare October 15, 2019 17:23
@olleolleolle olleolleolle changed the title Add JRuby 9.2 to CI matrix (investigating) Skip tests that do not run on JRuby Oct 15, 2019
Copy link
Member

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree we won't be able to officially support it, but it would still be good to have JRuby covered!

@iMacTia
Copy link
Member

iMacTia commented Jan 10, 2020

@olleolleolle I guess next step here is to add JRuby to the GitHub Actions matrix?

@olleolleolle
Copy link
Member Author

One thing about GH actions, they don't take Allow Failure easily

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

Successfully merging this pull request may close these issues.

None yet

3 participants