-
Notifications
You must be signed in to change notification settings - Fork 512
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
WIP: fix chromium screenshots issues with CDP #955
base: master
Are you sure you want to change the base?
Conversation
The new event loop is:
The new event loop works pretty well in my manual testing. However, one constant issue I'm facing is the tests in Tracebacks of failed test cases
It looks like that the spawned splash server process in pytest fixture got killed/exited somehow after the first test case is running, which does not make any sense. I have debugged it for quite some hours, but didn't find the cause yet. |
Hey @lucywang000! I can see these lines in logs on Travis:
These two lines are concerning:
It seems more than 1 Splash is running (which may happen in tests - though not sure why exactly; either way, we should be supporting it, as locally running Splash tests with -n8 is nice), and they share the same port for devtools, which causes problems. |
Do you think there is a way to support starting several Splash instances? For ports which Splash controls, in tests we use ports selected dynamically. |
Can it be a matter of setting |
You may be able to add devtools_portnum option to SplashServer, and implement it via setting an env variable here: Line 83 in a1f4488
|
@kmike it turned out there is a flag need to be set: Lines 142 to 144 in 12fff66
This also somehow matches the strange thing I saw earlier: the tests in test_render_chromium.py always failed after the first test cases is passed. Not sure why it's not there when qt5reactor is used. Now the tests can all pass on my local machine. |
Great catch @lucywang000! |
Are you sure these failures happen after upgrade to asyncio even loop, not after adding an ENV variable which enables devtools? |
Yeah. When I reverted my changes and the tests could all pass. |
This reverts commit 2863396.
Please see #953 for the background.