Issue Details (XML | Word | Printable)

Key: SRC-371
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jennifer Bevan
Reporter: Dan Fabulich
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

reuseBrowserSession broken during deadlock patch

Created: 19/Oct/07 06:47 PM   Updated: 05/Mar/08 01:49 AM   Resolved: 05/Mar/08 01:49 AM
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.0

File Attachments: 1. Text File jbevan-src371.patch (49 kB) 04/Mar/08 11:14 PM - Jennifer Bevan
2. Text File jbevan-src371.patch (44 kB) 14/Jan/08 12:56 PM - Jennifer Bevan



 Description  « Hide

endSession is sort-of doing the right thing by resetting the session instead of closing it, but getNewBrowserSession no longer attempts to get sessions from the cache of unused sessions, so this will just leave lots of open sessions lying around.

[The old unused browser session scheme wasn't very good anyway, because you couldn't use it with non-PI sessions. This is SRC-341; to fix it, we'd need to track which sessions have been used with which domains and only reuse a session if the starting domain matches (or if the launcher is multi-domain compatible, e.g. *chrome or *iehta).]



Sort Order: Ascending order - Click to sort in descending order
Jennifer Bevan added a comment - 06/Dec/07 10:26 AM

Hey – I'll be taking a look at this soon. Just to clarify, you don't want the sessions to just be dereferenced for the garbage collector, but instead to be kept and reused like a ThreadPool?


Dan Fabulich added a comment - 06/Dec/07 10:30 AM

Not just the session objects, but the browser sessions themselves. If reuseBrowserSession is enabled, the browser should never close until the server shuts down.


Jennifer Bevan added a comment - 14/Jan/08 12:55 PM

I have a working patch for this – care to review it? I extracted the session handling code out of SeleniumDriverResourceHandler and into "BrowserSessionFactory".

I don't think that any of the functional test suite (which no longer runs by default between rev 2102 and 2116?) had any reuseBrowserSessions, but the unit tests work and I'm looking into adding more functional tests.

Attaching the patch to the issue...
-Jen


Dan Fabulich added a comment - 04/Mar/08 03:59 AM

we've got to fix this for 1.0


Jennifer Bevan added a comment - 04/Mar/08 11:14 PM

This patch handles AFAIK all of the issues for SRC-371, and is 99% done for SRC-341. I'll begin testing on my various configurations tonight, because previously this has worked for firefox but not so much for IE.

There is an outstanding issue around line 818 of FrameGroupCommandQueueSet about what URL to open when resetting (and reusing) a non-PI mode browser. This (last I checked) worked for non-PI *chrome but not for non-PI *iexplore.

There is also an outstanding issue on the number/type of tests. I (or Dan?) need to add some higher-level tests. The unit tests are okay.


Dan Fabulich added a comment - 05/Mar/08 01:49 AM

Fixed in revision 2200