|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
richfaces a4j:pollI'm currently working w/ Stan on the JSFUnit project and I've observed some strange behavior using the latest htmlunit w/ richfaces. How does htmlunit deal with javascript threads that are still running (or in a setTimeout()) when the EnclosingWindow navigates away from that page?
For example, I have a page with an a4j:poll control (richfaces) that essentially makes an ajax call periodically to update something on the page. I've put some log output in the action listener function that gets called when the poller fires so I can see it on the console. When I use click() on a navigation link, and then verify the navigation has occurred, I still periodically see the log ouput as if the poll thread is still running. I've been trying to write a test that illustrates the problem, but I have no idea how I would verify the thread from a test case. Any ideas about the problem? Or perhaps ideas about how to go about verifying the behavior in a test? (Is there a way to inspect the thread manager to see if javascript threads that are associated with a page stay around after the page is gone?) Brian |
|
|
Re: richfaces a4j:pollHi Brian,
This could very well be a bug. ThreadManager has an activeCount() method that should only be > 0 if there is some JS waiting to be executed... so you could have a first page that invokes setInterval(), causing activeCount() to go up to 1; then navigate to the second page and see if it ever goes back down to 0.
Take care,
Daniel
On Mon, Jun 30, 2008 at 9:31 PM, Brian Gregory <bgregory@...> wrote:
-- Daniel Gredler http://daniel.gredler.net/ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
Re: richfaces a4j:pollActually, that is one of the things that was confusing me. When I load the initial page I get an activeCount() = 1, then I
click a button that deactivates the poll control and get an activeCount() =
3?, and then I navigate away from the page and the number keeps going up.
Writing a test that shows the activeCount() increase should be easy. (BTW, We’re using the NicelyResynchronizingAjaxController()
) Brian From:
htmlunit-user-bounces@...
[mailto:htmlunit-user-bounces@...] On Behalf Of D&J
Gredler Hi Brian, This could very well be a bug. ThreadManager has an
activeCount() method that should only be > 0 if there is some JS waiting to
be executed... so you could have a first page that invokes setInterval(),
causing activeCount() to go up to 1; then navigate to the second page and see
if it ever goes back down to 0. Take care, Daniel On Mon, Jun 30, 2008 at 9:31 PM, Brian Gregory <bgregory@...> wrote:
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
| Free Forum Powered by Nabble | Forum Help |