Hi Thomas,

It is called at the loading of the page but the HtmlUnitThread only runs 
while that call is blocking...

I'm struggling to point the finger at a particular line of code but:
* Fiddling with the number of seconds GWT specifies to HTMLUnit can make 
the problem appear and disappear (a colleague has duplicated but I had to 
mess with Maven dependencies so not as reliable at test as wanted)
* I noticed that when a test stalls the HTMLUnit JavaScript thread was 
"gone".

I'll try and write a unit test before raising an issue but is not easy as 
seems non-deterministic.

btw Congratulations on your new role in the steering committee. Bit scary 
as the code as been sooooooooo good so far but fingers crossed.

Cheers

Sam

On Wednesday, July 11, 2012 10:34:40 AM UTC+1, Thomas Broyer wrote:
>
>
>
> On Wednesday, July 11, 2012 9:21:10 AM UTC+2, salk31 wrote:
>>
>> Sorry for talking to myself but...
>>
>> waitForBackgroundJavaScriptStartingBefore looks like a possible cause. It 
>> is called here:
>>
>> http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java#158
>>  
>> with a value of 2s the implementation of this method seems a bit odd:
>>
>> http://grepcode.com/file/repo1.maven.org/maven2/net.sourceforge.htmlunit/htmlunit/2.9/com/gargoylesoftware/htmlunit/WebClient.java#WebClient.waitForBackgroundJavaScriptStartingBefore%28long%29
>>  
>> It seems to block while the number of jobs is different to the number of 
>> jobs after the time passed to it...
>>
>> This time starts _before_ servlet startup so in our case that could 
>> easily be longer than 2s....
>>
>> Just me or both these bits of code a bit dodgy? Maybe gwt should pass the 
>> unit test timeout value to htmlunit or just some huge value?
>>>
>>>
>>>
> IIUC, that code is called when loading the page, to wait for the GWT code 
> to launch, but before tests are executed. I doubt it's the culprit.
> BTW, have you set the logs to SPAM level? that could help find where 
> things hang. Also maybe a threaddump (not sure I could help, but pretty 
> sure the people knowing the internals better than me would find them useful)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/fJQQgMuN3jUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to