Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0042165 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
design defect | [Openbravo ERP] Y. DBSourceManager | minor | have not tried | 2019-10-31 10:05 | 2022-02-01 08:07 | |||||||
Reporter | AugustoMauch | View Status | public | |||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0042165: DBSM.assertExportIsConsistent works only with databases with only one first-level object | |||||||||||
Description | The DbsmTest.assertExportIsConsistent method only works properly only when the model contains only one first-level component (i.e. one function, one table (which may contain several columns, indexes, etc)). It is not suitable for other simple models (i.e. one that has a materialized view, because it contains two first-level models, the materialized view and the table it gets data from). When checking if each component has been exported consistently, it should extract from the XML model only the part relevant to the component being asserted. For instance, in a model that contains both a table and a materialized view, to check if the table has been consistently exported the following comparison is done: <?xml version="1.0" encoding="UTF-8"?> <database name="TABLE TEST"> <table name="TEST" primaryKey="TEST_ID"> <column name="TEST_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false"> <default /> <onCreateDefault /> </column> <column name="COL1" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> <default /> <onCreateDefault /> </column> <column name="COL2" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> <default /> <onCreateDefault /> </column> </table> </database> <?xml version="1.0" encoding="UTF-8"?> <database name="TABLE TEST"> <table name="TEST" primaryKey="TEST_ID"> <column name="TEST_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false"> <default /> <onCreateDefault /> </column> <column name="COL1" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> <default /> <onCreateDefault /> </column> <column name="COL2" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> <default /> <onCreateDefault /> </column> </table> <materializedView name="TEST_MATERIALIZEDVIEW"> <![CDATA[SELECT t.col1 AS matviewcol FROM test t]]> <column name="MATVIEWCOL" primaryKey="false" required="false" type="OTHER" autoIncrement="false"> <default /> <onCreateDefault /> </column> </materializedView> </database> The assertion fails, because the whole model is being compared with the exported object, instead of picking only the table element. | |||||||||||
Steps To Reproduce | - In the MaterializedViews class, try to use assertExportIsConsistent instead of assertExportedMaterializedView. - All tests will fail | |||||||||||
Proposed Solution | Extract from the model only the part relevant with the database object being asserted | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Issue History | |||
Date Modified | Username | Field | Change |
2019-10-31 10:05 | AugustoMauch | New Issue | |
2019-10-31 10:05 | AugustoMauch | Assigned To | => platform |
2019-10-31 10:05 | AugustoMauch | Modules | => Core |
2019-10-31 10:05 | AugustoMauch | Triggers an Emergency Pack | => No |
2019-10-31 10:14 | alostale | Type | defect => design defect |
2022-02-01 08:07 | alostale | Assigned To | platform => Triage Platform Base |
Copyright © 2000 - 2009 MantisBT Group |