Write Data Dictionary based doc search unit tests (KULRICE-3686)

[KULRICE-3687] Create data dictionary test data Created: 03/Nov/09  Updated: 03/Nov/10  Resolved: 09/Nov/09

Status: Closed
Project: Kuali Rice Development
Component/s: Unit Testing
Affects Version/s: 1.0.1, 1.0.1.1
Fix Version/s: 1.0.1.1, KFS Release 3.0.1

Type: Sub Task Priority: Critical
Reporter: Garey Taylor Assignee: James Smith
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Rice Module:
KEW

 Description   

As described in the parent Jira this part of the task deals with creating, or using existing, data dictionary test information.

Basically the xml and bootstrap info needed to test the data dictionary doc search features.



 Comments   
Comment by James Smith [ 03/Nov/09 ]

So this document will need to have a getter that returns a date, a long, a decimal, and a string. What other data types do we want to test against?

Comment by Chad Hagstrom [ 03/Nov/09 ]

James, I've committed my current work thus far to the 1.0.1.1 branch. See my comment on the parent issue for a list of the added and updated files.

Comment by James Smith [ 03/Nov/09 ]

Thanks; I'm taking a look.

Comment by James Smith [ 03/Nov/09 ]

Looks great. I think I will add some boolean and sql date versus timestamp stuff to test to the document since those are edge cases in the dd searchable attribute stuff.

Everything in the test looks great, though I'm curious where the data dictionary file for the new document is loaded into the data dictionary (I'm probably missing some test module config...)

Comment by James Smith [ 03/Nov/09 ]

Saw where the data dictionary stuff gets loaded.

Comment by Chad Hagstrom [ 03/Nov/09 ]

I believe the DD files are loaded by the "testModule" bean defined in KnsTestSpringBeans.xml. Also, I'm currently modifying the unit test so that it follows the format of my other searchable attribute tests, and I'll have it use the bootstrapped data once that is set up. And thanks for adding the extra boolean and date/timestamp fields for covering extra use cases; I'll test those out in my unit tests as well.

Comment by Chad Hagstrom [ 03/Nov/09 ]

James, I just realized something that might need to be added to the new document's database table. Do you know if the DB table needs FDOC_NBR, OBJ_ID, and VER_NBR fields as well?

Comment by James Smith [ 03/Nov/09 ]

It does. I'll need to make changes for my extra field as well - should I just go ahead and add these?

Comment by Chad Hagstrom [ 03/Nov/09 ]

Yes, that's fine. Thanks!

Comment by James Smith [ 03/Nov/09 ]

Okay, Chad, I committed the changes.

My version of Oracle (XE based on 10g) didn't like "BIGINT" - I changed those to NUMBER(14) in kns.sql - hope that's okay.

Comment by Chad Hagstrom [ 03/Nov/09 ]

James, I've just submitted a couple changes of my own, most notably to the unit test class itself. However, I've left the @Ignore annotation present on the unit test method for now because I'm getting this error when attempting to route the test document:

  • SQLException during execution of sql-statement:
  • sql statement was 'SELECT A0.DOC_HDR_ID,A0.OBJ_ID,A0.VER_NBR,A0.ACCT_NUM,A0.ACCT_OWNR,A0.ACCT_BAL,A0.ACCT_OPN_DAT,A0.ACCT_STAT,A0.ACCT_UPDATE_DT_TM,A0.ACCT_AWAKE FROM ACCT_DD_ATTR_DOC A0 WHERE A0.DOC_HDR_ID IN '
  • Exception message is [ORA-00942: table or view does not exist
    ]
  • Vendor error code [942]
  • SQL state code [42000]

Any idea why it can't find the table (if that's what is causing this problem)? Or is this something that we won't need to deal with once the bootstrapping is fully configured?

Comment by James Smith [ 03/Nov/09 ]

Well, there's a question I wish I knew the answer to : - >

Do we need to run the kns.sql ourselves, perhaps on some test data source? I'm trying the test locally...

Comment by James Smith [ 09/Nov/09 ]

Chad, I'm at a point where I can resolve this, right? Thanks!

Comment by Chad Hagstrom [ 09/Nov/09 ]

Yes, you can go ahead and resolve this; I have plenty of test documents to work with now. Thanks for your help!

Comment by James Smith [ 09/Nov/09 ]

Thanks Chad.

Generated at Wed Sep 30 05:18:37 CDT 2020 using JIRA 7.0.11#70121-sha1:19d24976997c1d95f06f3e327e087be0b71f28d4.