Uploaded image for project: 're-motion'
  1. RM-7080

Flaky Test: ChromeDownloadHandler does not find any files in the download directory sometimes

    Details

      Description

      The Test "FileDownloadTest.TestDownload_InternetExplorer_HandleZipFileDownload" (to be renamed to "FileDownloadTest.TestDownload_HandleZipFileDownload") failed once on our Build Server with following Stacktrace

       

      Stacktraces:

      *(new)* Remotion.Web.Development.WebTesting.IntegrationTests.dll: Remotion.Web.Development.WebTesting.IntegrationTests.FileDownloadTest.TestDownload_InternetExplorer_HandleZipFileDownload
      
      Expected: No Exception to be thrown  But was:   (Did not find any new files in the download directory.) 
        at Remotion.Web.Development.WebTesting.DownloadInfrastructure.Chrome.ChromeNamedExpectedFileNameFinderStrategy.FindDownloadedFile(IReadOnlyCollection`1 newFiles) in c:\Build\7c3c02be38047c5b\working\Remotion\Web\Development.WebTesting\DownloadInfrastructure\Chrome\ChromeNamedExpectedFileNameFinderStrategy.cs:line 47
         at Remotion.Web.Development.WebTesting.DownloadInfrastructure.DownloadedFileFinder.WaitForDownloadCompleted(TimeSpan downloadStartedTimeout, TimeSpan downloadUpdatedTimeout, IReadOnlyCollection`1 filesInDownloadDirectoryBeforeDownload) in c:\Build\7c3c02be38047c5b\working\Remotion\Web\Development.WebTesting\DownloadInfrastructure\DownloadedFileFinder.cs:line 145
         at Remotion.Web.Development.WebTesting.DownloadInfrastructure.Chrome.ChromeDownloadHelper.HandleDownload(DownloadedFileFinder downloadedFileFinder, TimeSpan downloadStartedTimeout, TimeSpan downloadUpdatedTimeout) in c:\Build\7c3c02be38047c5b\working\Remotion\Web\Development.WebTesting\DownloadInfrastructure\Chrome\ChromeDownloadHelper.cs:line 116
         at Remotion.Web.Development.WebTesting.DownloadInfrastructure.DownloadHelperBase.HandleDownloadWithExpectedFileName(String fileName, Nullable`1 downloadStartedTimeout, Nullable`1 downloadUpdatedTimeout) in c:\Build\7c3c02be38047c5b\working\Remotion\Web\Development.WebTesting\DownloadInfrastructure\DownloadHelperBase.cs:line 53
         at Remotion.Web.Development.WebTesting.IntegrationTests.FileDownloadTest.<TestDownload_InternetExplorer_HandleZipFileDownload>b__1b() in c:\Build\7c3c02be38047c5b\working\Remotion\Web\Development.WebTesting.IntegrationTests\FileDownloadTest.cs:line 421
         at NUnit.Framework.Constraints.ThrowsNothingConstraint.Matches(Object actual)
         at Remotion.Web.Development.WebTesting.IntegrationTests.FileDownloadTest.TestDownload_InternetExplorer_HandleZipFileDownload() in c:\Build\7c3c02be38047c5b\working\Remotion\Web\Development.WebTesting.IntegrationTests\FileDownloadTest.cs:line 420
      

       

      This looks like a flaky test. Screenshot showed that Chrome has downloaded the file, but our test could not find any new file in the download directory. So either our Testcode has a race condition for a specific scenario or Chrome.

      Just because of gut feeling, i think that Chrome has not completed the Download. This is highly speculative and unproven. Maybe their virus scanner crashed because of the multiple of tests? (https://superuser.com/questions/678601/disable-chromes-built-in-automatic-virus-scanning-of-downloaded-files) Try to reproduce the error consistently before trying to fix something.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Florian Decker
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: