For the tests, best to leave the original exception thrown I would think.

Regards,
Tim

Regis wrote:
Hi,

The original code hide the actual exception. Could you please try below patch on org.apache.harmony.sql.tests.internal.rowset.CachedRowSetTestCase, which will
expose the exception. Thanks in advance!

Index: src/test/java/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetTestCase.java
===================================================================
--- src/test/java/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetTestCase.java (revision 650405) +++ src/test/java/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetTestCase.java (working copy)
@@ -58,11 +58,7 @@
         try {
             conn = DriverManager.getConnection(DERBY_URL);
         } catch (SQLException e) {
-            try {
-                conn = DriverManager.getConnection(DERBY_URL_Create);
-            } catch (SQLException ee) {
-                throw new SQLException("Create DB Failure!");
-            }
+            conn = DriverManager.getConnection(DERBY_URL_Create);
         }

         st = conn.createStatement();






Chen Yang wrote:
Regis:
   Thanks.
   The original stack trace is the whole for test class:
CachedRowSetDeleteTest's method testDeleteRow_CursorPos:
The error message:

Create DB Failure!

java.sql.SQLException: Create DB Failure!
at
org.apache.harmony.sql.tests.internal.rowset.CachedRowSetTestCase.setUp(CachedRowSetTestCase.java:64)

Don't know whether it is enough or not.
--
 Chen


On 4/22/08, Regis <[EMAIL PROTECTED]> wrote:

Chen Yang wrote:

I have tried locally with updated classlib and rebuilt with ant clean
(Win32
and Win64). I can still meet lots test failures other than the one that
you
have met, mostly is:

Create DB Failure!

java.sql.SQLException: Create DB Failure!

Seems Derby create database failed. Could you give more details of
exception stack trace?
It would be helpful to see what cause the problem.

Best Regards,
Regis.

at
org.apache.harmony.sql.tests.internal.rowset.CachedRowSetTestCase.setUp(CachedRowSetTestCase.java:64)

--
 Chen

On 4/22/08, Regis <[EMAIL PROTECTED]> wrote:

Regis wrote:


Alexey Varlamov wrote:

Integrity testing [1] shows 1 failure in SQL (+7 failures in other
modules) :

Test:  testUpdateAsciiStream
Class:

 org.apache.harmony.sql.tests.internal.rowset.CachedRowSetStreamTest
 junit.framework.AssertionFailedError: expected:<和谐> but was:<??>
 at

org.apache.harmony.sql.tests.internal.rowset.CachedRowSetStreamTest.testUpdateAsciiStream(CachedRowSetStreamTest.java:787)

 at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)

I found it was failed when the default locale didn't support
Chinese

characters, even on RI.
I think the test case could be rewrite to fit different environments.
I
have filed a JIRA [1]
to trace this issue.

[1] https://issues.apache.org/jira/browse/HARMONY-5773

Best Regards,
Regis.


 I'm looking on this, it seems some locale data cause the failure...
BTW, classlib tests are "RED" since mid-February, does anyone care
to

fix or exclude problematic cases? Here is the current list:

error  testRead
org.apache.harmony.archive.tests.java.util.jar.ManifestTest
error  testGetAttribute
org.apache.harmony.lang.management.MemoryPoolMXBeanImplTest
error  testGetCollectionUsage

org.apache.harmony.lang.management.tests.java.lang.management.MemoryPoolMXBeanTest

failure  testStart
org.apache.harmony.luni.tests.java.lang.ProcessBuilderTest
failure  test_ConstructorI
org.apache.harmony.luni.tests.java.net.MulticastSocketTest
failure  test_ConstructorLjava_util_TimeZone
org.apache.harmony.luni.tests.java.util.GregorianCalendarTest
failure  test_ConstructorLjava_util_TimeZoneLjava_util_Locale
org.apache.harmony.luni.tests.java.util.GregorianCalendarTest
failure  testUpdateAsciiStream

org.apache.harmony.sql.tests.internal.rowset.CachedRowSetStreamTest

[1] http://people.apache.org/~varlax/harmony-integrity/

--
Alexey

2008/4/22, Xiao-Feng Li <[EMAIL PROTECTED]>:

They failed in my local testings with SVN. I don't know if that's
a
known issue and if that blocks any new commits.

Thanks,
xiaofeng

--
http://xiao-feng.blogspot.com







Reply via email to