Buggy behavior with gadgets tests in EndToEndTest.java
------------------------------------------------------

                 Key: SHINDIG-1694
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1694
             Project: Shindig
          Issue Type: Bug
          Components: Java
    Affects Versions: 3.0.0
         Environment: shindig java
            Reporter: Evgeny Bogdanov
            Assignee: Evgeny Bogdanov


I ran into a problem with JS API tests in shindig.
It seems that it does not gather the tests asserts correctly in 
EndToEndTest.java.
I run test with the following command:
mvn -Dtest=EndToEndTest -DfailIfNoTests=false test -P server

If I only change in the file: personTest.xml
line 34: "Shin Digg" to "Shin Dig"
the output of tests is SUCCESS, when it has to be FAILURE

It does not work with require "osapi" because alertHandler (in 
EndToEndTest.java) does not wait enough
for getting JS alerts from the gadget page.

"osapi" waits longer than normal "opensocial-9.0", so 
gadgets.util.registerOnLoadHandler takes longer and is not processed by 
alertHandler.

This behavior can be easily imitated if we change in testframework.js
    gadgets.util.registerOnLoadHandler(executeTest);
into
    setTimeout(executeTest, 2000);
In this case all the tests become broken.

There is a simple one-line solution to it. The patch is on the way.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to