Bug 825776 - TestScenario: Cannot expect field whose type is java.sql.Date
TestScenario: Cannot expect field whose type is java.sql.Date
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ER9
: BRMS 5.3.0.GA
Assigned To: Toni Rikkola
Sona Mala
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-28 08:35 EDT by Sona Mala
Modified: 2012-06-14 07:34 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
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)
screenshot for dd-MMM-yyyy (37.73 KB, image/png)
2012-05-28 08:35 EDT, Sona Mala
no flags Details
screenshot for yyyy-MM-dd (37.75 KB, image/png)
2012-05-28 08:36 EDT, Sona Mala
no flags Details
POJO model (709 bytes, application/x-java-archive)
2012-05-28 08:37 EDT, Sona Mala
no flags Details

  None (edit)
Description Sona Mala 2012-05-28 08:35:48 EDT
Created attachment 587232 [details]
screenshot for dd-MMM-yyyy

Description of problem:
I have POJO model with field 'date' whose type is java.sql.Date. In test scenario, I set field 'date' (section Given). In section Expect, I expect same value of date which I set in section Given. Test scenarion fail that these instance are not equal.

Version-Release number of selected component (if applicable):
ER8

How reproducible:


Steps to Reproduce:
1. set drools.dateformat in "preferences.properties" (if directory jboss-brms.war/WEB-INF/classes) to dd-MMM-yyyy or yyyy-MM-dd
2. start server
3. open guvnor
4. Upload POJO model (is attached)
5. Create test scenario (screenshot attached)
6. Click "Run Scenario"

  
Actual results:
Summary:[SqlDateFact] field [date] was [2012-05-28] expected [2012-05-28].
or
Summary:[SqlDateFact] field [date] was [2012-05-28] expected [28-May-2012].

Expected results:
Summary:[SqlDateFact] field [date] was [2012-05-28].

Additional info:
Problem is related with https://bugzilla.redhat.com/show_bug.cgi?id=814865
Comment 1 Sona Mala 2012-05-28 08:36:29 EDT
Created attachment 587233 [details]
screenshot for yyyy-MM-dd
Comment 2 Sona Mala 2012-05-28 08:37:37 EDT
Created attachment 587234 [details]
POJO model
Comment 5 Toni Rikkola 2012-05-30 06:43:25 EDT
Taking a look at this.
Comment 6 lcarlon 2012-05-31 02:03:19 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In the Given clause of a Test Scenario, a field of type java.sql.Date is recognized as a date, but an attempt to set a date value on it fails because it tries to set a util.Date on the field. This has been resolved in that, setting java.sql.Date no longer causes an error. Please see related issue <ulink url="https://bugzilla.redhat.com/show_bug.cgi?id=825776">BZ825776</ulink> for further details.
Comment 7 lcarlon 2012-05-31 02:03:54 EDT
Deleted Technical Notes Contents.

Old Contents:
In the Given clause of a Test Scenario, a field of type java.sql.Date is recognized as a date, but an attempt to set a date value on it fails because it tries to set a util.Date on the field. This has been resolved in that, setting java.sql.Date no longer causes an error. Please see related issue <ulink url="https://bugzilla.redhat.com/show_bug.cgi?id=825776">BZ825776</ulink> for further details.
Comment 8 lcarlon 2012-05-31 02:04:32 EDT
Release note content intended for BZ814865.
Comment 9 Ryan Zhang 2012-06-13 05:32:46 EDT
This issue's fixes  have been picked by ER9. Please verify them on ER9.
Comment 10 Sona Mala 2012-06-14 07:34:07 EDT
Verified for this date formats: yyyy-MM-dd and dd-MMM-yyyy

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