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

Random core_analytics PHPUnit error on Windows

    XMLWordPrintable

    Details

      Description

      Running PHPUnit on Windows 32-bit, PHP7, I encounter the following error:

      1) dataset_manager_testcase::test_get_pending_files
      stored_file_creation_exception: Can not create file "1/analytics/labelled/123/timesplitting/-core-analytics-time_splitting-quarters/1510383769.9985.csv" (Duplicate entry 'f8c9343a5fb7185127a20a2651d327a3def44499' for key 'p_file_pat_uix'
      INSERT INTO p_files (contextid,component,filearea,itemid,filepath,filename,timecreated,timemodified,mimetype,userid,source,author,license,status,sortorder,contenthash,filesize,pathnamehash) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
      [array (
        0 => 1,
        1 => 'analytics',
        2 => 'labelled',
        3 => 123,
        4 => '/timesplitting/-core-analytics-time_splitting-quarters/',
        5 => '1510383769.9985.csv',
        6 => 1510383769,
        7 => 1510383769,
        8 => 'text/csv',
        9 => NULL,
        10 => NULL,
        11 => NULL,
        12 => NULL,
        13 => 0,
        14 => 0,
        15 => 'ac12ad66225ef01f464b92bc53a4404b3d502556',
        16 => 55,
        17 => 'f8c9343a5fb7185127a20a2651d327a3def44499',
      )])
       
      C:\wamp\apps\integration_master\htdocs\lib\filestorage\file_storage.php:1331
      C:\wamp\apps\integration_master\htdocs\analytics\classes\dataset_manager.php:381
      C:\wamp\apps\integration_master\htdocs\analytics\tests\dataset_manager_test.php:142
      C:\wamp\apps\integration_master\htdocs\lib\phpunit\classes\advanced_testcase.php:80
      

      This seems to be random and happens in about 2 out of 5 runs.

        Attachments

          Activity

            People

            Assignee:
            dmonllao David Monllaó
            Reporter:
            jpataleta Jun Pataleta
            Peer reviewer:
            Eloy Lafuente (stronk7)
            Integrator:
            Jun Pataleta
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Elizabeth Dalton, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Jan/18