Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035062 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | have not tried | 2017-01-26 17:45 | 2017-03-15 20:18 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR17Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | d4172df71433 | ||||
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 | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035062: junit Weld tests not firing first 'begin transaction' event to DAL EventHandlers | |||||||
Description | Having an event Handler in DAL using onBeginTransaction & onCommitTransaction developer expects to always get alerted to both events in obivous order: 1.) begin 2.) end. Which works fine in the application. However when running junit tests extending WeldBaseTest the very first onBeginTransction event is missing causing functional errors if some custom EventHandler depends on this. As EventHandler technically run on every flush that bug can be very visible like breaking 1.9k junit tests (indirectly). Attached demo EventHandler is enough to show the problem. | |||||||
Steps To Reproduce | - Add attached demo code to show the bug - Run junit test 'CdiInfrastructure' in eclipse - Check log4j output and see that very first begin event is missing | |||||||
Tags | No tags attached. | |||||||
Attached Files | InterceptorBugTest.java [^] (1,924 bytes) 2017-01-26 17:45 | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0093850) shuehner (administrator) 2017-01-26 17:46 |
Possible cause: Interceptors are not setup or working properly at moment that very transaction is started. |
(0093888) hgbot (developer) 2017-01-27 12:58 |
Repository: erp/devel/pi Changeset: d4172df7143364ddce691d43fe5bc083244e95a2 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Jan 27 12:21:43 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/d4172df7143364ddce691d43fe5bc083244e95a2 [^] fixed bug 35062: junit Weld tests not firing first 'begin transaction' event This occurred in the 1st test case executed for each class because method OBBaseTest.setUp was invoked before WeldBaseTest @Before method (because of inheritance tree), this setUp method creates Dal transaction before WeldBaseTest configured observers. Fixed by enforcing correct execution order: 1st WeldBaseTest then OBBaseTest. --- M modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java --- |
(0093889) hgbot (developer) 2017-01-27 12:58 |
Repository: erp/devel/pi Changeset: 9faeff1d4b25469b52067d393e2d2ec23b691867 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Jan 27 12:22:42 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/9faeff1d4b25469b52067d393e2d2ec23b691867 [^] realted to bug 35062: added test cases --- M modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/testinfrastructure/DalPersistanceEventTest.java M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/ObserverBaseTest.java M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/OrderLineTestObserver.java --- |
(0093924) hgbot (developer) 2017-01-30 11:19 |
Repository: erp/devel/pi Changeset: c2c0957f23d30f2356c8252f13f2ead617d5e6b7 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Mon Jan 30 11:18:40 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/c2c0957f23d30f2356c8252f13f2ead617d5e6b7 [^] related to issue 35062: fix typo --- M modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/testinfrastructure/DalPersistanceEventTest.java --- |
(0093925) caristu (developer) 2017-01-30 11:20 |
Code review + testing OK: first 'begin transaction' event is now fired for classes extending WeldBaseTest. |
(0095129) hudsonbot (developer) 2017-03-15 20:18 |
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/54e102bef53e [^] Maturity status: Test |
(0095130) hudsonbot (developer) 2017-03-15 20:18 |
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/54e102bef53e [^] Maturity status: Test |
(0095138) hudsonbot (developer) 2017-03-15 20:18 |
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/54e102bef53e [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2017-01-26 17:45 | shuehner | New Issue | |
2017-01-26 17:45 | shuehner | Assigned To | => platform |
2017-01-26 17:45 | shuehner | Modules | => Core |
2017-01-26 17:45 | shuehner | Triggers an Emergency Pack | => No |
2017-01-26 17:45 | shuehner | File Added: InterceptorBugTest.java | |
2017-01-26 17:46 | shuehner | Note Added: 0093850 | |
2017-01-27 07:42 | alostale | Status | new => acknowledged |
2017-01-27 12:17 | alostale | Relationship added | related to 0035060 |
2017-01-27 12:18 | alostale | Status | acknowledged => scheduled |
2017-01-27 12:18 | alostale | Assigned To | platform => alostale |
2017-01-27 12:55 | alostale | Review Assigned To | => caristu |
2017-01-27 12:58 | hgbot | Checkin | |
2017-01-27 12:58 | hgbot | Note Added: 0093888 | |
2017-01-27 12:58 | hgbot | Status | scheduled => resolved |
2017-01-27 12:58 | hgbot | Resolution | open => fixed |
2017-01-27 12:58 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/d4172df7143364ddce691d43fe5bc083244e95a2 [^] |
2017-01-27 12:58 | hgbot | Checkin | |
2017-01-27 12:58 | hgbot | Note Added: 0093889 | |
2017-01-30 11:19 | hgbot | Checkin | |
2017-01-30 11:19 | hgbot | Note Added: 0093924 | |
2017-01-30 11:20 | caristu | Note Added: 0093925 | |
2017-01-30 11:20 | caristu | Status | resolved => closed |
2017-01-30 11:20 | caristu | Fixed in Version | => 3.0PR17Q2 |
2017-03-15 20:18 | hudsonbot | Checkin | |
2017-03-15 20:18 | hudsonbot | Note Added: 0095129 | |
2017-03-15 20:18 | hudsonbot | Checkin | |
2017-03-15 20:18 | hudsonbot | Note Added: 0095130 | |
2017-03-15 20:18 | hudsonbot | Checkin | |
2017-03-15 20:18 | hudsonbot | Note Added: 0095138 |
Copyright © 2000 - 2009 MantisBT Group |