-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Use Java ProcessBuilder for JRuby process launch #401
base: main
Are you sure you want to change the base?
Conversation
For JRuby implementation we need to add it to matrix, I wouldn't merge just one bit of the process I believe it's much harder than this. Can you add it to matrix? |
Sorry, I missed the reference. Do you mean their communications channel on Matrix? |
Oh I meant to https://github.com/rubycdp/ferrum/blob/main/.github/workflows/tests.yml |
@route I have added |
Looks like at some point connection to browser crashes and then after that all tests failing |
@jemelyah could you please rebase against latest main branch? |
191a9f4
to
7ac8b6d
Compare
@route just pushed the merged changes |
On it |
@route I've updated the code to reflect latest changes in Process class; however, my local tests are still failing, so I'll need to figure out how to handle the problems. |
Added JRuby to the matrix once again, lost it somewhere. |
spec/frame_spec.rb
Outdated
@@ -33,7 +33,7 @@ | |||
expect(frame.url).to end_with("/ferrum/get_cookie") | |||
end | |||
|
|||
it "finds main frame properly" do | |||
it "finds main frame properly", skip: Ferrum::Utils::Platform.jruby? do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JRuby populates browser.pages
differently, hece the lookup in this test does not work. Maybe it is necessary to update the test here to fit both rubies.
@route I was finally able to get the tests going locally, by redirecting the process output to the buffered reader instead of a file. |
@jemelyah how long does it take to tests to pass locally? |
I cannot test it on windows but I cannot even install gems on jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f Java HotSpot(TM) 64-Bit Server VM 19.0.1+10-21 on 19.0.1+10-21 +jit [arm64-darwin] on my mac. It's failing. |
@route, sorry for the delay; we are solving some issues with our solution to this; I hope to update this PR when we are done. |
@route, unfortunately, it fails and hangs with |
This looks very familiar to me, as I faced it long ago #15 |
Do tests pass locally on your machine for JRuby? |
References #400.
For the JRuby implementations, use Java ProcessBuilder to redirect Chrome process output to a specific file instead of stdout.