-
Notifications
You must be signed in to change notification settings - Fork 37
buster-ci should not allow additional browsers to be attached at the end of the process. #449
Comments
I'm beginning to believe that the additional slave browser are actually the same slave browser. What I think is happening is that when the tests are run, a synchronous execution is blocking the server from responding to the slave browsers. So the slave browsers think there's a disconnect and will attempt to reconnect. Once the synchronous execution is done, the server can respond to the slave browsers and reconnect. When the reconnect occurs, the page technically refreshes and is given a new |
Here's another log. [exec] validateBrowserConfig
[exec] capture browsers
[exec] ["1"]
[exec] sendMessage: {
[exec] browsers: { Phantom: { id: 1 } },
[exec] command: "start",
[exec] url: "http://localhost:1111/capture"
[exec] }
[exec] received command: {
[exec] browsers: { Phantom: { id: 1 } },
[exec] command: "start",
[exec] url: "http://localhost:1111/capture"
[exec] }
[exec] start browser Phantom
[exec] Test-JS PhantomJS PID: 37291
[exec]
[exec] slave ready: { slaveId: "1" }
[exec] []
[exec] All browsers are ready.
[exec] run tests
[exec] slave ready: { slaveId: "74d6ab3f-7e71-4e3e-9879-07fd3769223a" }
[exec] []
[exec] All browsers are ready.
[exec] close browsers
[exec] ["1"]
[exec] All done.Not all browsers could be closed!: 1
[exec]
[exec] sendMessage: { browsers: { Phantom: { id: 1 } }, command: "stop" } |
Perhaps buster-server-cli should run in a child process fork? |
I've also found that a REALLY long process could render the agent inaccessible because I'm seeing the following message.
I'm not sure if the browser is going idle would cause Faye Client to report that. |
Perhaps separating the buster-test-cli to run in a separate child process would also be a good idea. |
I am not convinced yet, that the cause of your problems has something to do with blocking synchronous tasks. First of all i wonder why a browser gets a new session id after reconnecting. I will clarify that first and then investigate your problem further. |
@GCheung55, i have just released version 0.2.2 of buster-ci, which now captures a phantom browser, if you add configuration option |
@GCheung55, is your issue solved? |
I will check in the morning. -Garrick-
|
Didn't seem to address the issue. Here's the logged output. Capture browsers
["0"]
Starting headless browser...
Headless browser was captured.
Slave ready: { slaveId: "0" }
[]
All browsers are ready.
Run tests
Slave ready: { slaveId: "31c95d89-7cc4-4ca2-8024-540fc7e0d418" }
[]
All browsers are ready.
Close browsers
No browsers have to be closed.
All done. As you can see, there are two slave ID's. The buster-ci config: module.exports = {
outputFile: outputPath,
server: {
host: serverHost,
port: serverPort
runPhantom: true
},
// browsers: {
// Phantom: {
// start: phantomjsPath,
// startArgs: [
// 'pjs-runner.js'
// ]
// }
// },
// agents: {
// localhost: {
// port: 18888,
// browsers: ['Phantom']
// }
// },
captureTimeout: 40,
closeTimeout: 40,
// logLevel: 'warn'
logLevel: 'debug'
}; The |
I think this can be easily reproduced with
What happens here is that once the |
I forgot to mention how block synchronous tasks is related to the killed- My understanding is that slave browser will periodically ping the |
Somehow, additional browsers are being attached at the end of the test runs. Browsers should only attach at the beginning and prevented when close to the end of the process.
The text was updated successfully, but these errors were encountered: