Open GoogleCodeExporter opened 8 years ago
I believe JsTD already supports the use case you want. We are setup exactly as
you have described above and it works great.
Here is what we are doing:
We are running multiple instances of the JsTD server on our build machine. So
we have servers running on:
http://build:9000
http://build:9001
http://build:9002
...
We then have a machine that is dedicated to running the browsers for the
servers. Right now, it's a windows machine running
Firefox. Firefox is setup to open a tab for each server above when it is
started. So we have a bunch of tabs:
http://build:9000/capture
http://build:9001/capture
http://build:9002/capture
...
Then, all that is needed is to adjust the server: setting in your config file,
or specify it manually when running the tests using -
-server.
The way we are using this is that we have about 15 JsTD server instances. We
have 4 that are reserved for use by our Hudson
build slaves. The rest are used by developers, where each developer has his
own JsTD server to test against.
Running in this mode, we typically need to restart the browser running all the
tests about once a week. Additionally, we need
to restart the JsTD servers on the build machine occasionally.
Original comment by burke.we...@gmail.com
on 23 Apr 2010 at 3:07
This issue is a bit old. Any news on this, because we are facing exactly the
same problem and are thinking more alternatives to the fact that the server
cannot handle more than one concurrent client throwing tests requests at it...
Original comment by davidst@gmail.com
on 29 Feb 2012 at 5:01
It's supposed to queue multiple requests until the request is done. What's log
look like?
Original comment by corbinrs...@gmail.com
on 29 Feb 2012 at 5:06
Will try to reproduce it again.
Anyway, looking at the code in FileSetGetHandler it looks like if the browser
is in use, it simply returns that it failed to get a new session for the test:
public void startSession(String id, PrintWriter writer) {
logger.debug("trying to start session for {}", id);
SlaveBrowser browser = capturedBrowsers.getBrowser(id);
String sessionId = UUID.randomUUID().toString();
SlaveBrowser slaveBrowser = capturedBrowsers.getBrowser(id);
if (browser.tryLock(sessionId)) {
logger.debug("got session lock {} for {}", sessionId, id);
writer.write(sessionId);
slaveBrowser.resetCommandQueue();
slaveBrowser.clearResponseQueue();
browser.heartBeatLock(sessionId);
} else {
logger.debug("checking session status for {}", id);
// session is probably stalled
if (!browser.inUse()) {
logger.debug("forcing unlock for {}", id);
browser.forceUnlock();
slaveBrowser.resetCommandQueue();
slaveBrowser.clearResponseQueue();
writer.write(browser.tryLock(sessionId) ? sessionId : "FAILED");
} else {
logger.debug("session unvailable for {}", id);
writer.write("FAILED");
}
}
writer.flush();
}
Original comment by davidst@gmail.com
on 29 Feb 2012 at 5:35
Half the story. See
http://code.google.com/p/js-test-driver/source/browse/trunk/JsTestDriver/src/com
/google/jstestdriver/browser/BaseBrowserSessionManager.java
For the other half.
Original comment by corbinrs...@gmail.com
on 29 Feb 2012 at 5:46
although I'm now seeing the BrowserActionExecutorAction which is related to
what you are saying, probably...
I'll get back to you when I can reproduce it again
Original comment by davidst@gmail.com
on 29 Feb 2012 at 5:49
Retrying with the very last version fixed the problem for me, thx!
Original comment by davidst@gmail.com
on 1 Mar 2012 at 11:51
Original issue reported on code.google.com by
akiel...@gmail.com
on 27 Mar 2010 at 5:40