Moodle
  1. Moodle
  2. MDL-42803

Fix behat random failure in add_scorm.feature

    Details

      Description

      There is a random behat failure, sometimes there is no enough time to load the iframe which contents are checked in mod/scorm/tests/behat/add_scorm.feature

      http://nightly01:8080/view/07.%20Behat%20whole%20suite/job/8.-%20Run%20all%20behat%20features%20(master)/234/console

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            David Monllaó added a comment -

            Attaching patch provided by ankit, please Ankit Agarwal feel free to send to peer review once you are ready and I comment about it, all seems ok tough

            Show
            David Monllaó added a comment - Attaching patch provided by ankit, please Ankit Agarwal feel free to send to peer review once you are ready and I comment about it, all seems ok tough
            Hide
            Ankit Agarwal added a comment -

            up for review David.
            Thanks

            Show
            Ankit Agarwal added a comment - up for review David. Thanks
            Hide
            David Monllaó added a comment -

            Hi Ankit,

            Looks good; why is the 2.5 patch not including the return to the main iframe? I think would be safer to include it, just in case it breaks compatibility when running the tests in other browser + OS combinations. As the random failure is likely to appear when the computer is short of resources you might want to add some info for the tester about it. Feel free to send to integration when you are ok.

            Show
            David Monllaó added a comment - Hi Ankit, Looks good; why is the 2.5 patch not including the return to the main iframe? I think would be safer to include it, just in case it breaks compatibility when running the tests in other browser + OS combinations. As the random failure is likely to appear when the computer is short of resources you might want to add some info for the tester about it. Feel free to send to integration when you are ok.
            Hide
            Ankit Agarwal added a comment -

            Because... there is no usage of iframes in 2.5 It was not needed in 2.5, since the navigation was not hidden in 2.5 for small screens.(Refer MDL-42287 for the full discussion)

            Cheers

            Show
            Ankit Agarwal added a comment - Because... there is no usage of iframes in 2.5 It was not needed in 2.5, since the navigation was not hidden in 2.5 for small screens.(Refer MDL-42287 for the full discussion) Cheers
            Hide
            David Monllaó added a comment -

            good, feel free to send to integration, thanks

            Show
            David Monllaó added a comment - good, feel free to send to integration, thanks
            Hide
            Ankit Agarwal added a comment -

            Thanks for the review, pushing forward

            Show
            Ankit Agarwal added a comment - Thanks for the review, pushing forward
            Hide
            Damyon Wiese added a comment -

            Thanks Ankit integrated to 25 and master. We can pass this when David confirms that behat is passing.

            In general though - adding sleeps all over is not a good solution. We should see if we can remove these sleeps once MDL-41030 is integrated.

            Show
            Damyon Wiese added a comment - Thanks Ankit integrated to 25 and master. We can pass this when David confirms that behat is passing. In general though - adding sleeps all over is not a good solution. We should see if we can remove these sleeps once MDL-41030 is integrated.
            Hide
            Michael de Raadt added a comment -

            Starting this test after checking with Adrian.

            Show
            Michael de Raadt added a comment - Starting this test after checking with Adrian.
            Hide
            Michael de Raadt added a comment -

            Test result: Success!

            Tested in 25 and master.

            Master results...

            $ for i in {1..5}; do echo "Starting test $i"; vendor/bin/behat --config /home/michael/web/data/master_integration_behat_behat:80/behat/behat.yml --tags @mod_scorm; done
            Starting test 1
            ........................
             
            1 scenario (1 passed)
            24 steps (24 passed)
            1m33.674s
            Starting test 2
            ........................
             
            1 scenario (1 passed)
            24 steps (24 passed)
            1m34.292s
            Starting test 3
            ........................
             
            1 scenario (1 passed)
            24 steps (24 passed)
            1m34.529s
            Starting test 4
            ........................
             
            1 scenario (1 passed)
            24 steps (24 passed)
            1m34.867s
            Starting test 5
            ........................
             
            1 scenario (1 passed)
            24 steps (24 passed)
            1m34.072s
            

            25 results...

            $ for i in {1..5}; do echo "Starting test $i"; vendor/bin/behat --config /home/michael/web/data/25_integration_behat_behat:80/behat/behat.yml --tags @mod_scorm; done
            Starting test 1
            .....................
             
            1 scenario (1 passed)
            21 steps (21 passed)
            1m39.026s
            Starting test 2
            .....................
             
            1 scenario (1 passed)
            21 steps (21 passed)
            1m39.523s
            Starting test 3
            .....................
             
            1 scenario (1 passed)
            21 steps (21 passed)
            1m38.964s
            Starting test 4
            .....................
             
            1 scenario (1 passed)
            21 steps (21 passed)
            1m38.53s
            Starting test 5
            .....................
             
            1 scenario (1 passed)
            21 steps (21 passed)
            1m40.364s
            

            Show
            Michael de Raadt added a comment - Test result: Success! Tested in 25 and master. Master results... $ for i in {1..5}; do echo "Starting test $i"; vendor/bin/behat --config /home/michael/web/data/master_integration_behat_behat:80/behat/behat.yml --tags @mod_scorm; done Starting test 1 ........................   1 scenario (1 passed) 24 steps (24 passed) 1m33.674s Starting test 2 ........................   1 scenario (1 passed) 24 steps (24 passed) 1m34.292s Starting test 3 ........................   1 scenario (1 passed) 24 steps (24 passed) 1m34.529s Starting test 4 ........................   1 scenario (1 passed) 24 steps (24 passed) 1m34.867s Starting test 5 ........................   1 scenario (1 passed) 24 steps (24 passed) 1m34.072s 25 results... $ for i in {1..5}; do echo "Starting test $i"; vendor/bin/behat --config /home/michael/web/data/25_integration_behat_behat:80/behat/behat.yml --tags @mod_scorm; done Starting test 1 .....................   1 scenario (1 passed) 21 steps (21 passed) 1m39.026s Starting test 2 .....................   1 scenario (1 passed) 21 steps (21 passed) 1m39.523s Starting test 3 .....................   1 scenario (1 passed) 21 steps (21 passed) 1m38.964s Starting test 4 .....................   1 scenario (1 passed) 21 steps (21 passed) 1m38.53s Starting test 5 .....................   1 scenario (1 passed) 21 steps (21 passed) 1m40.364s
            Hide
            Eloy Lafuente (stronk7) added a comment -

            It's Friday, I'm tired so I won't be very imaginative today.

            No matter of that, yes, you did it! Thanks for your collaboration!

            Closing this as fixed!

            Show
            Eloy Lafuente (stronk7) added a comment - It's Friday, I'm tired so I won't be very imaginative today. No matter of that, yes, you did it! Thanks for your collaboration! Closing this as fixed!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: