Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036938Openbravo ERPY. DBSourceManagerpublic2017-09-25 11:152018-01-03 12:38
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q1 
caristu
Core
No
0036938: dbsm test: src changes not applied
When dbsm test cases are executed, modifications in src data are not correctly applied.
1. Execute org.openbravo.dbsm.test.sourcedata.SourcedataUpdates.allChangesInARowAreExecutedAltogether()

  -> It fails:

java.lang.AssertionError: updated value in test.col1
Expected: is "v2"
     but: was "v1"
Test infrastructure should be refactored to reuse actual production code rather than maintaining an ad-hoc copy of it.
No tags attached.
duplicate of feature request 0036996 closed alostale remove unused platforms from dbsm 
related to defect 0035653 closed alostale update.database can fail updating src tables with a check constraint where more than one column participates 
Issue History
2017-09-25 11:15alostaleNew Issue
2017-09-25 11:15alostaleAssigned To => platform
2017-09-25 11:15alostaleModules => Core
2017-09-25 11:15alostaleTriggers an Emergency Pack => No
2017-09-25 11:16alostaleRelationship addedrelated to 0035653
2017-09-25 11:23hgbotCheckin
2017-09-25 11:23hgbotNote Added: 0099530
2017-09-28 12:32alostaleStatusnew => scheduled
2017-09-28 12:32alostaleAssigned Toplatform => alostale
2017-10-03 08:14hgbotCheckin
2017-10-03 08:14hgbotNote Added: 0099708
2017-10-03 14:00alostaleRelationship addedduplicate of 0036996
2017-10-03 14:01alostaleReview Assigned To => caristu
2017-10-03 14:07hgbotCheckin
2017-10-03 14:07hgbotNote Added: 0099719
2017-10-03 14:07hgbotStatusscheduled => resolved
2017-10-03 14:07hgbotResolutionopen => fixed
2017-10-03 14:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/900d0380bca96341fd0063d860b3c2ef541d877d [^]
2017-10-03 14:07hgbotCheckin
2017-10-03 14:07hgbotNote Added: 0099721
2017-10-03 14:07hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/900d0380bca96341fd0063d860b3c2ef541d877d [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/15b45f710a6e86faf4c09f74ce560f0ba76394ee [^]
2017-10-03 14:08hgbotCheckin
2017-10-03 14:08hgbotNote Added: 0099722
2017-10-03 14:08hgbotCheckin
2017-10-03 14:08hgbotNote Added: 0099723
2017-10-03 14:09hgbotCheckin
2017-10-03 14:09hgbotNote Added: 0099725
2017-10-06 08:42caristuNote Added: 0099782
2017-10-06 08:42caristuStatusresolved => closed
2017-10-06 08:42caristuFixed in Version => 3.0PR18Q1
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101309

Notes
(0099530)
hgbot   
2017-09-25 11:23   
Repository: erp/devel/dbsm-main
Changeset: 5711f00fc2938fee4b0cf72edc53ac3e2a68323c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Sep 25 11:00:49 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/5711f00fc2938fee4b0cf72edc53ac3e2a68323c [^]

related to bug 36938: src changes not applied in dbsm tests

  Temporaryly disabled test case that relies in this functionality.

---
M src-test/src/org/openbravo/dbsm/test/sourcedata/SourcedataUpdates.java
---
(0099708)
hgbot   
2017-10-03 08:14   
Repository: erp/devel/dbsm-main
Changeset: 3a727b10ea614c008910c737983459d4996254cb
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Oct 03 07:38:23 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/3a727b10ea614c008910c737983459d4996254cb [^]

related to bug 36984, related to bug 36938: added test case

  for 36984, disabled due to 36938

---
M src-test/src/org/openbravo/dbsm/test/sourcedata/SourcedataUpdates.java
A src-test/data/datachanges1/v1/TEST.xml
A src-test/data/datachanges1/v2/TEST.xml
A src-test/model/constraints/SIMPLE_UNIQUE.xml
---
(0099719)
hgbot   
2017-10-03 14:07   
Repository: erp/devel/pi
Changeset: 900d0380bca96341fd0063d860b3c2ef541d877d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Oct 03 13:50:17 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/900d0380bca96341fd0063d860b3c2ef541d877d [^]

fixed issue 36938, fixed issue 36996: dbsm for these issues

  - removed unused platforms
  - refactorized code to better reuse in tests
  - test properly apply ad updates

---
M src-db/database/lib/dbsourcemanager.jar
---
(0099721)
hgbot   
2017-10-03 14:07   
Repository: erp/devel/dbsm-main
Changeset: 15b45f710a6e86faf4c09f74ce560f0ba76394ee
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Sep 26 16:27:14 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/15b45f710a6e86faf4c09f74ce560f0ba76394ee [^]

fixed bug 36938: dbsm test: src changes not applied

  AD data was only inserted when it was new, but no changes were detected.

  This was caused because dataset relied on includeAllColumn preference, which is
  actually used only internally to add columns.

  Fixed including explicitilly all column when building manual datasets for testing.

---
M src/org/openbravo/ddlutils/process/DBUpdater.java
---
(0099722)
hgbot   
2017-10-03 14:08   
Repository: erp/devel/dbsm-main
Changeset: 75310c45131b2264c04b4e6c77f05701ff3175aa
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Sep 26 16:30:44 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/75310c45131b2264c04b4e6c77f05701ff3175aa [^]

related to bug 36938: disable some test cases

  When an AD column with default value but without on create default is created,
  data exported without this column will not get this default value (it would in
  case on create default is defined).

  It was wrongly tested the opposite behavior (default value is applied for AD
  data which is missing). This was not failing before because AD data was not being
  updated.

  Disabled now test case for AD, but kept for instance data.

---
M src-test/src/org/openbravo/dbsm/test/model/data/CreateDefault.java
---
(0099723)
hgbot   
2017-10-03 14:08   
Repository: erp/devel/dbsm-main
Changeset: d008499bc0cd33a5d975f930babef96c50a473ea
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Sep 26 16:31:10 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/d008499bc0cd33a5d975f930babef96c50a473ea [^]

related to bug 36938: enable temporaryly disabled test case

---
M src-test/src/org/openbravo/dbsm/test/sourcedata/SourcedataUpdates.java
---
(0099725)
hgbot   
2017-10-03 14:09   
Repository: erp/devel/dbsm-main
Changeset: 0a082650b68deb2338c2212d4d0e5455bd2ae7d3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Oct 03 09:03:30 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/0a082650b68deb2338c2212d4d0e5455bd2ae7d3 [^]

related to bug 36984, related to bug 36938: enabled test case

---
M src-test/src/org/openbravo/dbsm/test/sourcedata/SourcedataUpdates.java
---
(0099782)
caristu   
2017-10-06 08:42   
Code reviewed[1] and tested OK.

[1] https://docs.google.com/spreadsheets/d/1IWrY7VDtQj8MMQ-vZ7vgO2cY01BMUzXiGNhFMuTpcGk/edit#gid=0 [^]
(0101309)
hudsonbot   
2018-01-03 12:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test