db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1228537 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthProcs.java
Date Sat, 07 Jan 2012 01:39:27 GMT
Author: mikem
Date: Sat Jan  7 01:39:27 2012
New Revision: 1228537

URL: http://svn.apache.org/viewvc?rev=1228537&view=rev
Log:
DERBY-5559 AssertFailures (7, or 8) with ibm 1.6 and 1.5 on Windows XP in lang.NativeAuthProcs
fixture testAll

This change just adds explicit printout in the tests when the asserts fail,
it does not fix the test failures.
I added them to the 4 places I saw them failing in nightly runs as reported
in the apache nightly test run site for the following report:
http://people.apache.org/~myrnavl/derby_test_results/main/windows/testlog/ibm15/1227449-suites.All_diff.txt

All the problem areas are asserts based on timestamps and the tests seem to 
be waiting for some time such that these asserts will be true.  My guess is
that this methodology is not portable with the current values and may need to
be tuned more to work across all JVMs and hardware. 

I am seeing errors on a XP laptop running ibm jvm 16.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthProcs.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthProcs.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthProcs.java?rev=1228537&r1=1228536&r2=1228537&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthProcs.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthProcs.java
Sat Jan  7 01:39:27 2012
@@ -363,7 +363,12 @@ public class NativeAuthProcs extends Gen
         Arrays.fill( password, (char) 0 );
         
         long    newLastModified = getLastModified( dboConnection );
-        assertTrue( newLastModified > lastModified );
+
+        assertTrue( 
+            "expected newLastModified > lastModified, but instead: " +
+            "newLastModified = "  + newLastModified + 
+            "; lastModified  = "  + lastModified,
+            newLastModified > lastModified );
 
         goodStatement( dboConnection, "call syscs_util.syscs_drop_user( 'resetuser' )" );
     }
@@ -381,8 +386,22 @@ public class NativeAuthProcs extends Gen
              );
 
         long    newLastModified = getLastModified( dboConnection );
-        if ( shouldSucceed ) { assertTrue( newLastModified > oldLastModified ); }
-        else { assertTrue( newLastModified == oldLastModified ); }
+        if ( shouldSucceed ) 
+        { 
+            assertTrue( 
+                "expected newLastModified > oldLastModified, but instead: " +
+                "newLastModified = "     + newLastModified + 
+                "; oldLastModified  = "  + oldLastModified,
+                newLastModified > oldLastModified);
+        }
+        else 
+        { 
+            assertTrue( 
+                "expected newLastModified == oldLastModified, but instead: " +
+                "newLastModified = "     + newLastModified + 
+                "; oldLastModified  = "  + oldLastModified,
+                newLastModified == oldLastModified);
+        }
 
         return newLastModified;
     }
@@ -424,7 +443,11 @@ public class NativeAuthProcs extends Gen
         goodStatement( conn, "call syscs_util.syscs_modify_password( 'newpassword' )" );
                        
         long    newLastModified = getLastModified( dboConnection );
-        assertTrue( newLastModified > oldLastModified );
+        assertTrue( 
+            "expected newLastModified > oldLastModified, but instead: " +
+            "newLastModified = "   + newLastModified + 
+            "; oldLastModified  = "  + oldLastModified,
+            newLastModified > oldLastModified);
 
         // Make sure that we can modify a password in the approved fashion.
         char[]  password = new char[] { 'r','u','t','h','p','a','s','s','w','o','r','d' };
@@ -437,7 +460,11 @@ public class NativeAuthProcs extends Gen
         Arrays.fill( password, (char) 0 );
         
         long    newerLastModified = getLastModified( dboConnection );
-        assertTrue( newerLastModified > newLastModified );
+        assertTrue(
+            "expected newerLastModified > newLastModified, but instead: " +
+            "newerLastModified = "   + newerLastModified + 
+            "; newLastModified  = "  + newLastModified,
+            newerLastModified > newLastModified );
 
         return newerLastModified;
     }



Mime
View raw message