You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (Reopened) (JIRA)" <ji...@apache.org> on 2011/12/08 11:18:40 UTC
[jira] [Reopened] (DERBY-5521)
JDBCMBeanTest#testAttributeDriverLevel uses Java assert in lieu of JUnit
assert: no real testing happens
[ https://issues.apache.org/jira/browse/DERBY-5521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen reopened DERBY-5521:
---------------------------------------
Seems to have caused a problem on Java 5:
http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.5/testing/testlog/sles/1211538-suitesAll_diff.txt
suitesAll fail *************************************************************
1) testAttributeDriverLevel(org.apache.derbyTesting.functionTests.tests.management.JDBCMBeanTest)junit.framework.AssertionFailedError: Unexpected driver level string: J2SE 5.0 - JDBC 3.0
2) testAttributeDriverLevel(org.apache.derbyTesting.functionTests.tests.management.JDBCMBeanTest)junit.framework.AssertionFailedError: Unexpected driver level string: J2SE 5.0 - JDBC 3.0
suitesAll fail *************************************************************
> JDBCMBeanTest#testAttributeDriverLevel uses Java assert in lieu of JUnit assert: no real testing happens
> --------------------------------------------------------------------------------------------------------
>
> Key: DERBY-5521
> URL: https://issues.apache.org/jira/browse/DERBY-5521
> Project: Derby
> Issue Type: Bug
> Components: Test
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Priority: Minor
> Fix For: 10.9.0.0
>
> Attachments: derby-5521.diff, derby-5521b.diff
>
>
> Cf these lines:
> assert(driverLevelString.indexOf('?') == -1);
> assert(driverLevelString.matches("^JRE - JDBC: " + JDBCVersion + ".*"));
> The "assert" is a Java built-in rather than the JUnit assertTrue we need.
> The string driverLevelString is also wrong, since it is a mere toString of the bean name. We need to use getAttribute on it to get the driver level
> for asserting.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira