Changeset 6585


Ignore:
Timestamp:
Oct 31, 2014, 10:43:13 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #1873: Deleting child biomaterial doesn't return the used quantity to the parent

Test program for change history failed now that the remaining quantity is updated when a child item is deleted. This generates an extra entry in the change history table for the parent item that wasn't accounted for.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-stable/src/test/TestChangeHistory.java

    r6430 r6585  
    9595    TestExtract.test_delete(extractId);
    9696   
     97    // 1 CREATE event only
    9798    test_list_by_item(Item.BIOSOURCE, bioSourceId, 1);
    98     test_list_by_item(Item.SAMPLE, sampleId, 7);
     99   
     100    /*
     101      1 CREATE
     102      2 UPDATE (name and externalId)
     103      3 ADD+UPDATE+REMOVE ('change' annotation)
     104      2 UPDATE (remainingQuantity when creating/deleting extract)
     105    */
     106    test_list_by_item(Item.SAMPLE, sampleId, 8);
    99107    /*
    100108      Total change log events:
    101       5 CREATE (biosource, sample, annotationtype, extract, annotation)
    102       4 UPDATE (when updating and removing the annotation from the sample)
    103       2 DELETE (extract, annotation)
     109      4 CREATE (biosource, sample, annotationtype, extract)
     110      1 ADD (annotation)
     111      5 UPDATE (when updating the sample, it's annotation and child extract)
     112      1 REMOVE (annotation)
     113      1 DELETE (extract)
    104114    */
    105     test_list_by_user(TestUtil.getSessionControl().getLoggedInUserId(), since, 11);
     115    test_list_by_user(TestUtil.getSessionControl().getLoggedInUserId(), since, 12);
    106116   
    107117    if (TestUtil.waitBeforeDelete()) TestUtil.waitForEnter();
     
    110120    TestBioSource.test_delete(bioSourceId);
    111121    TestAnnotationType.test_delete(annotationTypeId);
    112     // 14 = The original 11 create+update + 3 delete
    113     test_delete_stray(14);
     122    // 15 = The original 12 create+update + 3 delete
     123    test_delete_stray(15);
    114124   
    115125    xtRegistry.unregisterExtension("test.db-logger");
Note: See TracChangeset for help on using the changeset viewer.