You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Veena Basavaraj (JIRA)" <ji...@apache.org> on 2014/11/26 17:22:13 UTC

[jira] [Comment Edited] (SQOOP-1814) Sqoop2: Need to revise repository related unittests

    [ https://issues.apache.org/jira/browse/SQOOP-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14226386#comment-14226386 ] 

Veena Basavaraj edited comment on SQOOP-1814 at 11/26/14 4:22 PM:
------------------------------------------------------------------

+ 1000. I have a similar JIRA open. I will link it. It is not a small endeavour either. It will take good amount of effort to refactor these.  SQOOP-1812 is one such issue that highlights how intertwined the repository create/ upgrade code and its logic is. The testing is even more harder to read.  Since I have worked on this code I have faced a whole of issues.

Here is my comment in the code 
{code}


// NOTE: If you have signed yourself to modify the schema for the repository
// such as a rename, change in table relationships or constraints, embrace yourself!
// The following code is supposed to be a chronological order of how the
// repository schema evolved. So do not ever change the following
// code directly. Instead make sure the upgrade queries are written to reflect
// the renames and changes in the table relationships or constraints
// It would have been nicer and much cleaner
// if this was not code but sql scripts. Having it in code it is very
// easy and tempting to rename or make changes to it and easily miss
// the upgrade code. Not to mention, make sure to
// the update the tests to use the upgrade queries as well
// Make sure to add a lot of comments to the upgrade code if there is an
// ordering dependency to help future contributors to not lose their sleep over
// enhancing this code

{code}


was (Author: vybs):
+ 1000. I have a similar JIRA open. I will link it. It is not a small endeavour either. It will take good amount of effort to refactor these. 

> Sqoop2: Need to revise repository related unittests
> ---------------------------------------------------
>
>                 Key: SQOOP-1814
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1814
>             Project: Sqoop
>          Issue Type: Sub-task
>            Reporter: Qian Xu
>             Fix For: 1.99.5
>
>
> There are massive SQL as test fixture in {{DerbyTestCase}}. With the development of schema, tests become hard to maintain. I'd suggest to design these test cases as integration test. The task might need to be broken down.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)