Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
See comments in the https://reviews.apache.org/r/26657/ for context on why we need this JIRA.
sqoop derby repository schema handler and its corresponding test code for upgrades are very brittle.
For instance, renaming a field in the repository table does not really break any test immediately, nor does the developer get any indication that a upgrade query must be written to enforce this.
We should fix this to guard developers from making changes to schema and not creating a corresponding upgrade script.
Second, the tests needs not have to copy paste the same query code to validate that the upgrade is working, we should be able to share the query code in such a way that any new upgrade code added to the repository handler breaks the tests automatically.
DerbyTestCase
Disclaimer that this code has a lot of
assumptions based on how the repository upgrade has happened. Take a deep breadth before
you make changes or have to add more code to this already sphagetti like code.For instance there
is only tests form version 2 to version 4. Why dont we have tests for version 2 to version 3 and version 3 to version 4.?
Attachments
Issue Links
- is a clone of
-
SQOOP-1566 Sqoop2: Fix the upgrade logic for SQOOP-1498
- Resolved
- relates to
-
SQOOP-823 Sqoop2: Provide comments for unit tests in Derby repository
- Open