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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045006
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2020-09-07 15:412021-09-03 07:21
ReporteralostaleView Statuspublic 
Assigned Tocberner 
PriorityimmediateResolutionfixedFixed in VersionPR20Q4
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045006: unstable background scheduler jUnit test

DescriptionMisfirePolicyTest is unstable failing randomly in CI
Steps To Reproduceie.
https://builds.openbravo.com/job/mod-simple/13424/testReport/junit/org.openbravo.scheduling.trigger/MisfirePolicyTest/checkMisfirePolicy_clustered_/ [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0046159 acknowledgedTriage Platform Base DalLockingTest.lockedObjectShouldAllowChildrenCreation is unstable 
caused by feature request 0041484 closedcberner make job scheduling clusterizable 

-  Notes
(0122786)
hgbot (developer)
2020-09-08 11:40

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/149 [^]
(0122893)
hgbot (developer)
2020-09-10 07:06

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 9c038fa5404812da14fc7c887947f8b0c5111780
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-09-10T05:05:23+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/9c038fa5404812da14fc7c887947f8b0c5111780 [^]

Fixes ISSUE-45006: Stabilize MisfirePolicyTest when clustered

MisfirePolicyTest checkMisfirePolicyWithSecondlySchedule was not waiting
enough for the execution of the expected 2 jobs. MisfireHandler checks every
second for missed jobs to execute. A lower time for the misfireHandler has been set, 500ms
and delay has been set to 3 seconds.
Also because of this, a race condition was happening when using
Dal transaction to access Lock table by quartz, it should not happen as
misfireHandler has plenty time to check and execute jobs now.

---
M src-test/src/org/openbravo/scheduling/trigger/MisfirePolicyTest.java
---
(0122894)
hgbot (developer)
2020-09-10 07:06

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/149 [^]
(0123070)
hgbot (developer)
2020-09-15 16:55

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/165 [^]
(0123081)
hgbot (developer)
2020-09-16 07:07

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/165 [^]
(0123082)
hgbot (developer)
2020-09-16 07:07

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 0748c7b3b120bdae4df4cf6268be731b72c7e5fa
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-09-15T16:51:28+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/0748c7b3b120bdae4df4cf6268be731b72c7e5fa [^]

Related to ISSUE-45006: Stabilize checkMisfirePolicy test in MisfirePolicyTest

Previously some modifications have been made to stabilize checkMisfirePolicyWithSecondlySchedule
By allowing more time for the MisfireHandler to detect the misfire, the
correct execution of the tests is enforced. Wait time for both
checkMisfirePolicy and everyNDaysNotExecutedOnMisfire tests is now 1
second, instead of 500 ms.

---
M src-test/src/org/openbravo/scheduling/trigger/MisfirePolicyTest.java
---
(0123557)
hgbot (developer)
2020-10-05 17:53

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/192 [^]
(0123660)
hgbot (developer)
2020-10-09 14:58

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 135c5be70963d2e930090c7d6861e143fd4d3087
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-10-09T14:48:05+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/135c5be70963d2e930090c7d6861e143fd4d3087 [^]

Related to ISSUE-45006: Stabilize MisfirePolicyTest tests in clustered mode

Tests in MisfirePolicyTest class were unstable in CI and as such, some
parts have been implemented with this in mind. scheduleJob method will
try to schedule a job and if it fails, it will retry after 1 second,
until it reaches maximum time of 10 seconds.

This will allow to handle some of the race-conditions that were
happening in CI in this issue.

Also, now those tests will test that the trigger has correctly misfired,
that was previously implied, but now it is actually tested using a
TriggerListener. Also waiting some time if the misfire was not
detected on the first 500ms. The maximum wait time is defined in
MAX_WAIT constant.

---
M src-test/src/org/openbravo/scheduling/trigger/MisfirePolicyTest.java
---
(0123661)
hgbot (developer)
2020-10-09 14:58

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/192 [^]
(0126123)
hgbot (developer)
2021-02-16 10:11

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/314 [^]
(0126163)
hgbot (developer)
2021-02-18 14:47

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 16d7adc08764f2fd9da0a9cdbd5bb25d685012f4
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2021-02-16T10:10:37+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/16d7adc08764f2fd9da0a9cdbd5bb25d685012f4 [^]

Related to ISSUE-45006: Stabilize MisfirePolicyTest tests in clustered mode

Tests in MisfirePolicyTest class were unstable in CI and as such, some
parts have been implemented with this in mind. scheduleJob method will
try to schedule a job and if it fails, it will retry after 1 second,
until it reaches maximum time of 10 seconds.

This will allow to handle some of the race-conditions that were
happening in CI in this issue.

Also, now those tests will test that the trigger has correctly misfired,
that was previously implied, but now it is actually tested using a
TriggerListener. Also waiting some time if the misfire was not
detected on the first 500ms. The maximum wait time is defined in
MAX_WAIT constant.

---
M src-test/src/org/openbravo/scheduling/trigger/MisfirePolicyTest.java
---
(0126164)
hgbot (developer)
2021-02-18 14:47

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/314 [^]

- Issue History
Date Modified Username Field Change
2020-09-07 15:41 alostale New Issue
2020-09-07 15:41 alostale Assigned To => cberner
2020-09-07 15:41 alostale Modules => Core
2020-09-07 15:41 alostale Triggers an Emergency Pack => No
2020-09-07 15:43 alostale Relationship added caused by 0041484
2020-09-08 11:40 hgbot Note Added: 0122786
2020-09-10 07:06 hgbot Resolution open => fixed
2020-09-10 07:06 hgbot Status new => closed
2020-09-10 07:06 hgbot Fixed in Version => PR20Q4
2020-09-10 07:06 hgbot Note Added: 0122893
2020-09-10 07:06 hgbot Note Added: 0122894
2020-09-15 16:55 hgbot Note Added: 0123070
2020-09-16 07:07 hgbot Note Added: 0123081
2020-09-16 07:07 hgbot Note Added: 0123082
2020-10-05 17:53 hgbot Note Added: 0123557
2020-10-09 14:58 hgbot Note Added: 0123660
2020-10-09 14:58 hgbot Note Added: 0123661
2021-02-16 10:01 cberner Relationship added related to 0045901
2021-02-16 10:11 hgbot Note Added: 0126123
2021-02-18 14:47 hgbot Note Added: 0126163
2021-02-18 14:47 hgbot Note Added: 0126164
2021-09-03 07:21 alostale Relationship added related to 0046159


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker