OSDN Git Service

A fix for jdbc regression test submitted yesterday by Kim Ho at Redhat
authorBarry Lind <barry@xythos.com>
Tue, 23 Sep 2003 06:11:06 +0000 (06:11 +0000)
committerBarry Lind <barry@xythos.com>
Tue, 23 Sep 2003 06:11:06 +0000 (06:11 +0000)
 Modified Files:
  ResultSetTest.java

src/interfaces/jdbc/org/postgresql/test/jdbc2/ResultSetTest.java

index 6a1803f..d7e621e 100644 (file)
@@ -229,10 +229,10 @@ public class ResultSetTest extends TestCase
                
                assertTrue(rs.next());
                assertEquals(-1,rs.getByte(1));
-               int count = 3;
                
                while (rs.next())
                {
+                       thrown = false;
                        try
                        {
                                rs.getByte(1);
@@ -243,10 +243,7 @@ public class ResultSetTest extends TestCase
                        }
                        if (!thrown)
                                fail("Exception expected.");
-                       count++;
                }
-               if (count != 9)
-                       fail("Exception expected.");
        }
                
        public void testgetShort() throws Exception
@@ -262,10 +259,10 @@ public class ResultSetTest extends TestCase
                
                assertTrue(rs.next());
                assertEquals(-1,rs.getShort(1));
-               int count = 3;
                
                while (rs.next())
                {
+                       thrown = false;
                        try
                        {
                                rs.getShort(1);
@@ -276,10 +273,7 @@ public class ResultSetTest extends TestCase
                        }
                        if (!thrown)
                                fail("Exception expected.");
-                       count++;
                }
-               if (count != 9)
-                       fail("Exception expected.");
        }
        
 }