You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2013/03/13 20:58:28 UTC

svn commit: r1456111 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java

Author: rhillegas
Date: Wed Mar 13 19:58:28 2013
New Revision: 1456111

URL: http://svn.apache.org/r1456111
Log:
DERBY-6108: Fix NPE in small device tests.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java?rev=1456111&r1=1456110&r2=1456111&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java Wed Mar 13 19:58:28 2013
@@ -180,11 +180,15 @@ public class JDBCDataSource {
                 setBeanProperty(ds, property, value);
             }
 
-            ds.setLoginTimeout( TestConfiguration.getCurrent().getLoginTimeout() );
+            if ( !BaseTestCase.isJ9Platform() && !BaseTestCase.isCVM() )
+            {
+                ds.setLoginTimeout( TestConfiguration.getCurrent().getLoginTimeout() );
+            }
             
             return ds;
         } catch (Exception e) {
-            BaseTestCase.fail("unexpected error", e);
+            BaseTestCase.printStackTrace( e );
+            BaseTestCase.fail("unexpected error: " + e.getMessage(), e);
             return null;
         }
     }