Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41554

core_rsslib_testcase::test_redirect failures due to tinyurl

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.6, 2.5.2
    • Fix Version/s: 2.4.7, 2.5.3
    • Component/s: RSS
    • Labels:
    • Environment:
      PHP 5.5.1-1
    • Testing Instructions:
      1. Run unit tests in lib/tests/rsslib_test.php
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE

      Description

      Hello,

      running unit tests, core_rsslib_testcase::test_redirect fails aparently because http://download.moodle.org/unittest/rsstest.xml is not a valid document http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fdownload.moodle.org%2Funittest%2Frsstest.xml

      When running it i got the following notice:

      PHP Notice: A feed could not be found at http://tinyurl.com/lvyslv. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed. in /var/lib/jenkins/workspace/Moodle-TestsOnly/lib/simplepie/library/SimplePie.php on line 1520

      And this is the test failure summary:

      1) core_rsslib_testcase::test_redirect
      Failed asserting that 'A feed could not be found at http://tinyurl.com/lvyslv. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.' is null.

      /var/lib/jenkins/workspace/Moodle-TestsOnly/lib/tests/rsslib_test.php:135
      /var/lib/jenkins/workspace/Moodle-TestsOnly/lib/phpunit/classes/basic_testcase.php:64

      To re-run:
      /usr/bin/phpunit core_rsslib_testcase lib/tests/rsslib_test.php

      I've tested commit ee788142f200c292a3ad95d8dedf61429e4eb761

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            poltawski Dan Poltawski added a comment -

            Hi Daniel,

            The problem isn't with the rsstest.xml file (in fact you can see it being tested in other tests and its been like this for some time), it seems to be a problem with tinyurl.

            I plan to change the redirect to download.moodle.org/unittest/ so we have something more stable to test against.

            Show
            poltawski Dan Poltawski added a comment - Hi Daniel, The problem isn't with the rsstest.xml file (in fact you can see it being tested in other tests and its been like this for some time), it seems to be a problem with tinyurl. I plan to change the redirect to download.moodle.org/unittest/ so we have something more stable to test against.
            Hide
            poltawski Dan Poltawski added a comment -

            Petr Skoda I know you are working on a related issue to this. Just checking you've not already fixed it

            Show
            poltawski Dan Poltawski added a comment - Petr Skoda I know you are working on a related issue to this. Just checking you've not already fixed it
            Hide
            skodak Petr Skoda added a comment -

            Yes, this should be resolved by MDL-41707, I will add some new simple redirector written in php - to be fetched from local repo, moodle.org or skipped.

            Show
            skodak Petr Skoda added a comment - Yes, this should be resolved by MDL-41707 , I will add some new simple redirector written in php - to be fetched from local repo, moodle.org or skipped.
            Hide
            poltawski Dan Poltawski added a comment -

            I will refrain from closing this until you've deployed it (and we should backport the new redirect url only to the stable branches)

            Show
            poltawski Dan Poltawski added a comment - I will refrain from closing this until you've deployed it (and we should backport the new redirect url only to the stable branches)
            Hide
            poltawski Dan Poltawski added a comment -

            TO INTEGRATOR: the same change is already in master (along with Petrs improvements to allow the unit test directory to come from locally). This should help stop the sporadic tiny url fails.

            Show
            poltawski Dan Poltawski added a comment - TO INTEGRATOR: the same change is already in master (along with Petrs improvements to allow the unit test directory to come from locally). This should help stop the sporadic tiny url fails.
            Hide
            dmonllao David Monllaó added a comment -

            Looks good Dan, http://download.moodle.org/unittest/rss_redir.php checked. No other tinyurl references in stable nor dev branches

            Show
            dmonllao David Monllaó added a comment - Looks good Dan, http://download.moodle.org/unittest/rss_redir.php checked. No other tinyurl references in stable nor dev branches
            Hide
            damyon Damyon Wiese added a comment -

            Tested and integrated to 24 and 25. Thanks Dan!

            Show
            damyon Damyon Wiese added a comment - Tested and integrated to 24 and 25. Thanks Dan!
            Hide
            damyon Damyon Wiese added a comment -

            Passing test.

            Show
            damyon Damyon Wiese added a comment - Passing test.
            Hide
            poltawski Dan Poltawski added a comment -

            Hurrah! Thanks for your contribution - this fix is part of Moodle.

            Show
            poltawski Dan Poltawski added a comment - Hurrah! Thanks for your contribution - this fix is part of Moodle.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/13