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

Random mod_chat externalib unit test failure

XMLWordPrintable

    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • MDL-61484-master
    • Hide
      Manual testing
      1. Create a chat activity in a course
      2. Log in as s1 and enter the chat
      3. On another browser window session (e.g. incognito), log in as s2 and enter the chat.
      4. Chat as s1 and s2 in a period less than 1 minute
        • As s1, enter 3 messages
        • As s2, enter 2 messages
      5. Leave the chat idle for 6 minutes
      6. Login as s3 on another browser session and enter the chat
      7. Chat as s1, s2 and s3 for more than 1 minute.
        • As s1, enter 2 messages
        • As s2, enter 4 messages
        • As s3, enter 3 messages
      8. Log everyone out. Wait for at least 5 minutes.
      9. Log in as admin and go to the chat activity.
      10. Click "View past chat sessions"
        • Confirm that you see a single chat session between s1, s2 and s3.
        • Confirm that you see the numbers beside s1, s2 and s3's names match the messages that they sent
      11. Add '&show_all=1' at the end of the URL, then hit Enter.
        • Confirm that you see the chat sessions between s1 and s2 and between s1, s2 and s3.
        • Confirm that you see the numbers beside s1, s2 and s3's names match the messages that they have sent in the corresponding chat sessions.
      Show
      Manual testing Create a chat activity in a course Log in as s1 and enter the chat On another browser window session (e.g. incognito), log in as s2 and enter the chat. Chat as s1 and s2 in a period less than 1 minute As s1, enter 3 messages As s2, enter 2 messages Leave the chat idle for 6 minutes Login as s3 on another browser session and enter the chat Chat as s1, s2 and s3 for more than 1 minute. As s1, enter 2 messages As s2, enter 4 messages As s3, enter 3 messages Log everyone out. Wait for at least 5 minutes. Log in as admin and go to the chat activity. Click " View past chat sessions " Confirm that you see a single chat session between s1, s2 and s3. Confirm that you see the numbers beside s1, s2 and s3's names match the messages that they sent Add ' &show_all=1 ' at the end of the URL, then hit Enter. Confirm that you see the chat sessions between s1 and s2 and between s1, s2 and s3. Confirm that you see the numbers beside s1, s2 and s3's names match the messages that they have sent in the corresponding chat sessions.

      I think it's not the first time I see this happening. So, creating the issue (after searching and not finding it):

      1) mod_chat_external_testcase::test_get_session_messages
      Failed asserting that actual size 4 matches expected size 5.
       
      /var/lib/jenkins/git_repositories/master/mod/chat/tests/externallib_test.php:477
      /var/lib/jenkins/git_repositories/master/lib/phpunit/classes/advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit mod_chat_external_testcase mod/chat/tests/externallib_test.php
      

      I may be wrong but, for some reason I've the feeling that it's caused by time/slowness. Just a random thought, not scientific at all, heh. Feel free to ignore it.

      Created so we can see how / if it happens again. Ciao

            jpataleta Jun Pataleta
            stronk7 Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            David Monllaó David Monllaó
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.