cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8641) (Windows Phone 8.1) Some file-transfer plugin tests occasionally fail in mobilespec
Date Wed, 02 Dec 2015 18:36:10 GMT

    [ https://issues.apache.org/jira/browse/CB-8641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15036335#comment-15036335
] 

ASF GitHub Bot commented on CB-8641:
------------------------------------

Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/118#discussion_r46454382
  
    --- Diff: src/windows/FileTransferProxy.js ---
    @@ -49,6 +49,17 @@ function nativePathToCordova(path) {
         return String(path).replace(/\\/g, '/');
     }
     
    +function alreadyCancelled(opId, errorCb, filePath, server) {
    +    var op = fileTransferOps[opId];
    +    if (op && op.state === FileTransferOperation.CANCELLED) {
    +        // Here we should call errorCB with ABORT_ERR error
    +        errorCb(new FTErr(FTErr.ABORT_ERR, nativePathToCordova(filePath), server));
    --- End diff --
    
    This side effect should not be part of the function. Please place it outside, into the
calling code. It will be duplicated, but that is still somewhat OK; it's definitely better
than someone calling if `alreadyCancelled()` twice in a row and getting their callback called
twice.


> (Windows Phone 8.1) Some file-transfer plugin tests occasionally fail in mobilespec
> -----------------------------------------------------------------------------------
>
>                 Key: CB-8641
>                 URL: https://issues.apache.org/jira/browse/CB-8641
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>            Reporter: Alexander Sorokin
>            Priority: Minor
>             Fix For: Master
>
>
> Some file-transfer plugin tests occasionally fail in mobilespec:
> File-transfer.spec.10 download should be stopped by abort() right away
> File-transfer.spec.21 upload should be stopped by abort() right away
> The issue seems to be caused by insufficient timeout and could be fixed by increasing
it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message