Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0045430 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | major | have not tried | 2020-11-11 18:21 | 2020-11-12 09:50 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | shuehner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | PR20Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | PR20Q4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | merged | |||||||
Review Assigned To | alostale | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0045430: Code to detect+warn about Unbalanced adminMode in OBBaseTest should be improved | |||||||
Description | OBBaseTest 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 OBContext.java (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 Reproduce | Cause 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 OBContext.java (ADMIN_TRACE_SIZE=100 for example) and notice that the debugging does not work. Example issue causing this situation is reported here: https://issues.openbravo.com/view.php?id=45428 [^] | |||||||
Proposed Solution | Replace/enhance existing code in OBBaseTest by calling/re-using the existing OBContext code. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0124299) hgbot (developer) 2020-11-12 09:47 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/226 [^] |
(0124300) hgbot (developer) 2020-11-12 09:48 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/226 [^] |
(0124301) hgbot (developer) 2020-11-12 09:48 |
Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 27393696f21803969753774a105236ad0459e28d Author: Stefan Huehner <stefan.huehner@openbravo.com> Date: 2020-11-12T09:44:26+01:00 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/27393696f21803969753774a105236ad0459e28d [^] 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/OBBaseTest.java M src/org/openbravo/dal/core/OBContext.java --- |
![]() |
|||
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 | Merge Request Status | open => merged |
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 |