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

webrick tests fail on jruby #6171

Closed
deivid-rodriguez opened this issue Apr 10, 2020 · 5 comments
Closed

webrick tests fail on jruby #6171

deivid-rodriguez opened this issue Apr 10, 2020 · 5 comments
Milestone

Comments

@deivid-rodriguez
Copy link
Contributor

We're getting a random test failure we're getting when testing rubygems against jruby, which shows a backtrace inside webrick's code.

Since the failure is specific to jruby, I tried running webrick tests against jruby.

Expected Behavior

webrick tests pass under jruby.

Actual Behavior

You can see the current failures on this WIP PR I opened at the webrick repo, where I just set up some changes so that the test suite at least runs properly.

current stable: https://github.com/ruby/webrick/pull/40/checks?check_run_id=577693801
current head: https://github.com/ruby/webrick/pull/40/checks?check_run_id=577693789

@headius
Copy link
Member

headius commented May 12, 2020

Hmm yes, we should get those tests running again and green. So many projects, so little time!

@deivid-rodriguez
Copy link
Contributor Author

Yeah... it happens :)

headius added a commit to headius/jruby that referenced this issue May 27, 2020
When using the reflective proxy generator, the crypt function will
fail to cascade through various possible libraries, instead
failing immediately on first call with the first library
attempted. This breaks some tests on jruby#6171.
headius added a commit to headius/jruby that referenced this issue May 29, 2020
In order to be able to expand paths that are marked as binary, we
need to be able to treat those paths as raw bytes. This change
attempts to decode those paths as ISO-8859-1 bytes, allowing the
path expansion to ignore any multibyte characters rather than
improperly decoding them. The final encoding is used to put the
ISO-8859-1 bytes back into their 8-bit form and re-mark them as
the eventually negotiated encoding.

This fixes part of the WEBrick "cjk" test failure by allowing the
binary-encoded multibyte path to be expanded without mangling the
MBC character.

This change is limited to when the incoming strings are explicitly
marked as "binary" using the ASCII-8BIT encoding, since that case
clearly has no encoding hint for us to use to get characters.
There may be other cases, like CR_UNKNOWN or CR_BROKEN, that also
deserve this treatment, but for now the change is limited to
explicitly binary strings.

See jruby#6171 for the general WEBRick bug and jruby#6246 for the PR that
attempts to fix failures.
headius added a commit to headius/jruby that referenced this issue May 29, 2020
When using the reflective proxy generator, the crypt function will
fail to cascade through various possible libraries, instead
failing immediately on first call with the first library
attempted. This breaks some tests on jruby#6171.
@headius headius added this to the JRuby 9.3.0.0 milestone Jun 2, 2020
@headius
Copy link
Member

headius commented Jun 2, 2020

With #6246 I believe I've made the tests as green as possible. A few issues remain:

The first case will need work in jruby-openssl that's probably unlikely to happen without some help from the community. The other two cases require fixes in the WEBrick tests. Only the test_sni failure happens consistently, at this point.

I'm going to close this since there's new issues filed for the SSL problems and the other issues are in WEBrick's tests.

@headius headius closed this as completed Jun 2, 2020
@headius
Copy link
Member

headius commented Jun 2, 2020

Oops, reopen until #6246 has been reviewed and merged.

@headius
Copy link
Member

headius commented Mar 5, 2021

#6246 was merged some time ago and resolved as many of these failures as possible. The remaining issues are not in JRuby.

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

No branches or pull requests

2 participants