Laurent,

PHPUnit tests are on the branch :) I just submitted a commit to fix travis issues, you will be able to merge the PR very soon.

On 06/01/2015 12:10 AM, Laurent Destailleur (aka Eldy) wrote:
You welcome,

We are missing PHPUnit tests, so please submit them on github...

2015-05-28 16:08 GMT+02:00 Arnaud Aujon Chevallier <[email protected] <mailto:[email protected]>>:

    I solved my problem myself :)

    I was creating an object in database in the setupBeforeClass
    method, looks like the connexion was never released...
    Solved it by live the creation in _construct.

    Sorry for the noise !

    Regards,


    On 05/27/2015 03:50 PM, Arnaud Aujon Chevallier wrote:
    Hi,

    I'm trying to write some tests for new api methods I added
    (createInvoice...).
    I created a new Test class WebservicesInvoicesTest that creates a
    new societe and then calls createInvoice, my problem is the
    database seems to be locked when trying to actually save the
    invoice (inside create method of Facture.class).
    "show processlist" query shows :

    Kill Kill
    
<http://localhost/phpmyadmin/sql.php?db=mysql&sql_query=KILL+157%3B&goto=sql.php%3Fdb%3Ddolibarr%26table%3Dllx_societe%26sql_query%3Dshow%2BPROCESSLIST%26goto%3Dindex.php%26token%3D826b4f730c016ef61883bce464f1aca0&token=826b4f730c016ef61883bce464f1aca0>
        157     dolibarr        localhost       dolibarr        Sleep   6       
        /NULL/  0.000
    Kill Kill
    
<http://localhost/phpmyadmin/sql.php?db=mysql&sql_query=KILL+158%3B&goto=sql.php%3Fdb%3Ddolibarr%26table%3Dllx_societe%26sql_query%3Dshow%2BPROCESSLIST%26goto%3Dindex.php%26token%3D826b4f730c016ef61883bce464f1aca0&token=826b4f730c016ef61883bce464f1aca0>
        158     dolibarr        localhost       dolibarr        Query   6       
update  INSERT
    INTO llx_facture ( facnumber, entity, ref_e...      0.000
    Kill Kill
    
<http://localhost/phpmyadmin/sql.php?db=mysql&sql_query=KILL+159%3B&goto=sql.php%3Fdb%3Ddolibarr%26table%3Dllx_societe%26sql_query%3Dshow%2BPROCESSLIST%26goto%3Dindex.php%26token%3D826b4f730c016ef61883bce464f1aca0&token=826b4f730c016ef61883bce464f1aca0>
        159     root    localhost       dolibarr        Query   0       /NULL/  
show
    PROCESSLIST         0.000


    After 30 seconds the api call timeout. Do you have an idea of
    what can happen here ?
    If a manually kill the first query, everything works fine. Does
    Dolibarr lock the databse to avoid parallel queries or something
    like that ?

    The code is available here :
    https://github.com/aaujon/dolibarr/tree/3.7-webservices-fix

    Thanks a lot !


    _______________________________________________
    Dolibarr-dev mailing list
    [email protected]  <mailto:[email protected]>
    https://lists.nongnu.org/mailman/listinfo/dolibarr-dev


    _______________________________________________
    Dolibarr-dev mailing list
    [email protected] <mailto:[email protected]>
    https://lists.nongnu.org/mailman/listinfo/dolibarr-dev




_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à