Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10088

filetransfer spec.10 and spec.11 test is faulty

    XMLWordPrintableJSON

Details

    Description

      Copied from:
      https://issues.apache.org/jira/browse/CB-10082?focusedCommentId=15028283&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15028283

      This is within the context of mobile-spec's autotests.

      I added some logs in the native code, and cordova-filetransfer.tests spec.10's file "downloaded" within 30ms (probably because of caching). When calling abort, there is no active file transfer so the failure callback is not called back to JavaScript:
      https://github.com/apache/cordova-plugin-file-transfer/blob/887c91750a28d077976bd5340f9002ab2b569da6/src/ios/CDVFileTransfer.m#L380

      Since the failure callback is never called (the abort), and the the unexpected download success was called, the test fails.

      The test is faulty and needs to be reworked to take into account this case, where the download finished before the file could be aborted (the test delays the abort call).

      Attachments

        Issue Links

          Activity

            People

              shazron Shazron Abdullah
              shazron Shazron Abdullah
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: