Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045415
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformminorhave not tried2020-11-10 22:362020-11-11 07:15
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in VersionPR20Q4
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR20Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045415: Skip AccessLevelTest.testADataAccessLevel also for views

Descriptionthe testADataAccessLevel test iterates over all entities and tries to query them to verify ad_client/ad_org values of the resulting rows.

The testcase already skips entities not being a real 'database table':
- isDataSourceBased
- isHQLBased

      if (e.isDataSourceBased() || e.isHQLBased()) {
        // The entity is not associated with a database table, so it does not apply

With the same argumentation probably entities with isView() (having underlying database view's should be skipped)

Concrete failing example:
- custom view calling a database function depending on config/masterdata setup to even work

Current output:
- org.hibernate.exception.GenericJDBCException: could not extract ResultSet
- Inside stacktrace it points to date-setup problem
Caused by: org.postgresql.util.PSQLException: ERROR: @NoConversionRate@ (MXN-$) @to@ (EUR-€) @ForDate@ '11-11-2020', @Client@ 'QA Testing' @And@ @ACCS_AD_ORG_ID_D@ 'USA'.
  Where: PL/pgSQL function c_currency_convert(numeric,character varying,character varying,timestamp without time zone,character varying,character varying,character varying) line 38 at RAISE

Apart from maybe skipping views the testcase does not help at all to point to the entity having the issue.

Attached patch skips views + adds some context (entityName) to any exception thrown while running a query.
Steps To ReproduceNoticed in a customer/project instance (ask reporter is needed for a concrete example)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0045414 closedshuehner Skip AccessLevelTest.testADataAccessLevel also for views 

-  Notes
(0124272)
hgbot (developer)
2020-11-11 07:12

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 08f98a2fab9822e2c29621441f76c042a7a76d3e
Author: Stefan Hühner <stefan.huehner@openbravo.com>
Date: 2020-11-11T07:12:27+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/08f98a2fab9822e2c29621441f76c042a7a76d3e [^]

fixed ISSUE-45415: AccessLevelTest.testADataAccessLevel tests on views

While in general testing access level on views is not a problem, there
are some cases when this is problematic as tested view might require on
some extra config which could be not set.

This patch:

  * Skips testing on database views
  * Adds information about the entity that failed in case of an
    exception

---
M src-test/src/org/openbravo/test/security/AccessLevelTest.java
---

- Issue History
Date Modified Username Field Change
2020-11-11 07:08 alostale Type defect => backport
2020-11-11 07:08 alostale Target Version => PR20Q4
2020-11-11 07:12 hgbot Resolution open => fixed
2020-11-11 07:12 hgbot Status scheduled => resolved
2020-11-11 07:12 hgbot Fixed in Version => PR20Q4
2020-11-11 07:12 hgbot Note Added: 0124272
2020-11-11 07:15 alostale Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker