[arquillian-issues] [JBoss JIRA] (ARQGRA-274) The request guard does timeout for delayed requests

Bernard Labno (JIRA) jira-events at lists.jboss.org
Fri Apr 26 17:51:53 EDT 2013


    [ https://issues.jboss.org/browse/ARQGRA-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770497#comment-12770497 ] 

Bernard Labno edited comment on ARQGRA-274 at 4/26/13 5:51 PM:
---------------------------------------------------------------

Ok, I think I've found a trace.

{code:lang=java}
    try {
        guardAjax(inputA).sendKeys("Any"); //This goes well, cause inputA has ajax tied to keyup which is triggered by sendKeys
    } catch (RequestGuardException e) {
        fail("Unexpected RequestGuardException");
    }
    inputB.sendKeys("Anything");
    guardAjax(inputB.findElement(By.xpath("//body"))).click();
{code}

{code:lang=xml}
<h:inputTextarea id="inputB" value="#{panelBean.inputText}" onchange="log(event)" onkeyup="log(event)">
    <a4j:ajax event="change"/>
</h:inputTextarea>
{code}

So ajax is triggered on "change" event, which is not triggered by sendKeys. To trigger that event I'm trying to imitate "blur" event by clicking on the body. I see that "change" event is logged to javascript console, but no ajax request is happening. So it looks like something is blocking the request on the browser side.

Other observation is that if I comment try/catch block out then test passes.
                
      was (Author: blabno):
    Ok, I think I've found a trace.

{code:lang=java}
    try {
        guardAjax(inputA).sendKeys("Any"); //This goes well, cause inputA has ajax tied to keyup which is triggered by sendKeys
    } catch (RequestGuardException e) {
        fail("Unexpected RequestGuardException");
    }
    inputB.sendKeys("Anything");
    guardAjax(inputB.findElement(By.xpath("//body"))).click();
{code}

{code:lang=xml}
<h:inputTextarea id="inputB" value="#{panelBean.inputText}" onchange="log(event)" onkeyup="log(event)">
    <a4j:ajax event="change"/>
</h:inputTextarea>
{code}

So ajax is triggered on "change" event, which is not triggered by sendKeys. To trigger that event I'm trying to imitate "blur" event by clicking on the body. I see that "change" event is logged to javascript console, but no ajax request is happening. So it looks like something is blocking the request on the browser side.
                  
> The request guard does timeout for delayed requests
> ---------------------------------------------------
>
>                 Key: ARQGRA-274
>                 URL: https://issues.jboss.org/browse/ARQGRA-274
>             Project: Arquillian Graphene
>          Issue Type: Bug
>    Affects Versions: 2.0.0.Alpha3
>            Reporter: Bernard Labno
>            Assignee: Lukáš Fryč
>             Fix For: 2.0.0.Alpha4
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> In RichFaces, there is request queue which can delay a processing of an user action which avoids overwhelming communication channel.
> This is simply the case where request guard should:
> * wait specified timeout (by default type "Ajax" timeout) for user action to start AJAX request (xhr.open)
> * then wait another timeout (by default type "Ajax" timeout) for AJAX action to complete the request (xhr.readyState == 4)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the arquillian-issues mailing list