db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2518) convert lang/releaseCompileLocks.sql to junit
Date Wed, 18 Jul 2007 00:10:04 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513400
] 

Daniel John Debrunner commented on DERBY-2518:
----------------------------------------------

Not sure I understand these changes (e.g. in DMLInStaticInitializer.java)

-			System.out.println("Caught exception " + se);
-			se.printStackTrace(System.out);
+			if (!se.getSQLState().endsWith("38001")){
+				System.out.println("Caught exception " + se);
+				se.printStackTrace(System.out);
+			}


Printing lines to System.out in a JUnit test will not cause the test to fail if SQLState is
not 38001?.

Why not throw the exception and have the assert in the Junit class that the correct exception
is thrown?

And why endsWith() for the SQLState check?

> convert  lang/releaseCompileLocks.sql to junit
> ----------------------------------------------
>
>                 Key: DERBY-2518
>                 URL: https://issues.apache.org/jira/browse/DERBY-2518
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Ramandeep Kaur
>            Assignee: Ramandeep Kaur
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: DERBY-2518_071707.diff, DERBY_2518.diff, DERBY_2518.stat
>
>
> convert lang/releaseCompileLocks.sql to junit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message