Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1694

Buggy behavior with gadgets tests in EndToEndTest.java

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0-beta1
    • 2.5.0-beta2
    • Java
    • None
    • shindig java

    Description

      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.

      Attachments

        1. shindig.patch
          0.7 kB
          Evgeny Bogdanov

        Activity

          People

            vohtaski Evgeny Bogdanov
            vohtaski Evgeny Bogdanov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: