Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformmajorhave not tried2020-11-11 18:212020-11-12 09:50
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
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0045430: Code to detect+warn about Unbalanced adminMode in OBBaseTest should be improved

DescriptionOBBaseTest class used by as basis for all unit tests has code to detect case that adminMode was not reset after running a testCase and warns in that case.

That code is conceptually similar to code in (method: clearAdminModeStack) called and the end of an http request.

However code in OBBaseTest has two problems:
a.) It is not integrated with existing ADMIN_TRACE_SIZE debugging code from OBContext (which helps to find out root-cause of those issues)
b.) It does not reset/fix the problem.
So after having 1 test-case having the problem it reports the error for every test-case running after it (even if those tests themselves are fine)

Steps To ReproduceCause and Unbalanced AdminMode problem in one junit test case
Run i.e. ant run.all.tests
Notice that
a.) the problem is not just reported in the test-cause having the issue but all later tests
b.) Activate debugging code in (ADMIN_TRACE_SIZE=100 for example) and notice that the debugging does not work.

Example issue causing this situation is reported here: [^]
Proposed SolutionReplace/enhance existing code in OBBaseTest by calling/re-using the existing OBContext code.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0045429 closedshuehner Code to detect+warn about Unbalanced adminMode in OBBaseTest should be improved 

-  Notes
hgbot (developer)
2020-11-12 09:47

Merge Request created: [^]
hgbot (developer)
2020-11-12 09:48

Merge request merged: [^]
hgbot (developer)
2020-11-12 09:48

Repository: [^]
Changeset: 27393696f21803969753774a105236ad0459e28d
Author: Stefan Huehner <>
Date: 2020-11-12T09:44:26+01:00
URL: [^]

Fixes ISSUE-45430: Improve unbalanced adminMode warnings in OBBaseTest.

OBBaseTest did already check if a test-case left adminMode enabled
instead of handling it properly.
However that detection was not integration with the existing OBContext
code for doing the same logic at the end of an http-request.

Reuse that existing code allows to reuse the debugging ADMIN_TRACE_SIZE
logic from OBContext also to debug Junit test issues.

M src-test/src/org/openbravo/test/base/
M src/org/openbravo/dal/core/

- Issue History
Date Modified Username Field Change
2020-11-12 07:40 alostale Type defect => backport
2020-11-12 07:40 alostale Target Version => PR20Q4
2020-11-12 09:47 hgbot Note Added: 0124299
2020-11-12 09:48 hgbot Resolution open => fixed
2020-11-12 09:48 hgbot Status scheduled => resolved
2020-11-12 09:48 hgbot Note Added: 0124300
2020-11-12 09:48 hgbot Fixed in Version => PR20Q4
2020-11-12 09:48 hgbot Note Added: 0124301
2020-11-12 09:50 alostale Review Assigned To => alostale
2020-11-12 09:50 alostale Status resolved => closed

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker