Bug 1249260 - [QE](6.1.z) Reading tasks from DB on MySQL 5.5 returns tasks with createdOn field that contains midnight time
[QE](6.1.z) Reading tasks from DB on MySQL 5.5 returns tasks with createdOn f...
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
6.1.0
Unspecified Unspecified
high Severity unspecified
: CR1
: 6.1.0
Assigned To: Maciej Swiderski
Tibor Zimanyi
:
Depends On: 1248527
Blocks: bpms6.1.3-payload
  Show dependency treegraph
 
Reported: 2015-07-31 21:00 EDT by Alessandro Lazarotti
Modified: 2015-08-28 06:21 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1248527
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alessandro Lazarotti 2015-07-31 21:00:24 EDT
+++ This bug was initially created as a clone of Bug #1248527 +++

Description of problem: 

When using MySQL 5.5 database system, reading tasks with method InternalTaskService.getActiveTasks() returns tasks that have narrowed creation time to midnight (e.g. 2015-07-23 00:00:00). Bug is probably somewhere where tasks are read from DB, because also method InternalTaskService.getActiveTasks(date) doesn't work.


Version-Release number of selected component (if applicable): 6.1.2.CR3


How reproducible: Run JUnit test LifeCycleLocalCommandBasedTest.testCompleteByActiveTasks from community repository jbpm using MySQL 5.5.

Actual results: Mentioned test fails. 

Expected results: Mentioned test passes. 

Additional info:

--- Additional comment from JBoss Product and Program Management on 2015-07-30 09:10:07 EDT ---

Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 2 Maciej Swiderski 2015-08-04 11:33:02 EDT
this is a mysql limitation as it does not store the milliseconds part of the time that is used to query for [1]. Since the rest does have a difference for the query on milliseconds level the tests in most of the cases fails.
I'll enhance the test to rely on second level difference so it will satisfy all data bases.

Looks like 5.6 of mysql is adding some support for this though not sure how it will work from JPA provider as it might require some additional configuration.

Anyway, milliseconds level is not a big issue in my opinion especially for task queries.

[1] http://dev.mysql.com/doc/refman/5.5/en/fractional-seconds.html
[2] http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
Comment 3 Maciej Swiderski 2015-08-14 12:28:26 EDT
improved test case back ported to 6..x branch
jbpm
https://github.com/droolsjbpm/jbpm/commit/075f74a475ba9ea737ff66f44dd49a01dc91029e
Comment 5 Tibor Zimanyi 2015-08-28 06:21:48 EDT
Verified by running LifeCycleLocalCommandBasedTest.testCompleteByActiveTasks on MySQL 5.5.

Note You need to log in before you can comment on or make changes to this bug.