Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 76934 invoked from network); 25 Apr 2007 23:44:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Apr 2007 23:44:40 -0000 Received: (qmail 83671 invoked by uid 500); 25 Apr 2007 23:44:47 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 83654 invoked by uid 500); 25 Apr 2007 23:44:46 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 83642 invoked by uid 99); 25 Apr 2007 23:44:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2007 16:44:46 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2007 16:44:38 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id B535E1A9838; Wed, 25 Apr 2007 16:44:18 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r532539 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ master/DerbyNetClient/ suites/ testData/ testData/ResultSetStream/ tests/jdbcapi/ Date: Wed, 25 Apr 2007 23:44:18 -0000 To: derby-commits@db.apache.org From: kmarsden@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070425234418.B535E1A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kmarsden Date: Wed Apr 25 16:44:16 2007 New Revision: 532539 URL: http://svn.apache.org/viewvc?view=rev&rev=532539 Log: DERBY-2577 convert jdbcapi/resultSetStream.java to junit Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/littleclob.utf (with props) db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/resultsetStream.gif (with props) db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/short.utf (with props) db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetStreamTest.java (with props) Removed: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/resultsetStream.out db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/resultsetStream.out db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream.gif db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream_app.properties Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall?view=diff&rev=532539&r1=532538&r2=532539 ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall Wed Apr 25 16:44:16 2007 @@ -1,6 +1,5 @@ jdbcapi/bestrowidentifier.sql jdbcapi/nullSQLText.java -jdbcapi/resultsetStream.java jdbcapi/parameterMapping.java jdbcapi/testRelative.java jdbcapi/SURTest_ij.sql Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/littleclob.utf URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/littleclob.utf?view=auto&rev=532539 ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/littleclob.utf (added) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/littleclob.utf Wed Apr 25 16:44:16 2007 @@ -0,0 +1,100 @@ +Beginning-this-is-itwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwposition-69-end-of-the-first-l +ine-we-are-now-on-the-second-onewwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwThis-is-position-204wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwww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wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +wwwwwwPosition-9907-behold-the-end-of-the-clob-is-nighwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/littleclob.utf ------------------------------------------------------------------------------ svn:eol-style = native Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/resultsetStream.gif URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/resultsetStream.gif?view=auto&rev=532539 ============================================================================== Binary file - no diff available. Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/resultsetStream.gif ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/short.utf URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/short.utf?view=auto&rev=532539 ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/short.utf (added) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/short.utf Wed Apr 25 16:44:16 2007 @@ -0,0 +1 @@ +test data: a string column inserted as an Ascii stream Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/ResultSetStream/short.utf ------------------------------------------------------------------------------ svn:eol-style = native Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml?view=diff&rev=532539&r1=532538&r2=532539 ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml Wed Apr 25 16:44:16 2007 @@ -47,6 +47,10 @@ + + + Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetStreamTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetStreamTest.java?view=auto&rev=532539 ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetStreamTest.java (added) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetStreamTest.java Wed Apr 25 16:44:16 2007 @@ -0,0 +1,437 @@ +/** + * Derby - Class org.apache.derbyTesting.functionTests.tests.lang.ResultSetStreamTest + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.derbyTesting.functionTests.tests.jdbcapi; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; +import java.io.StringReader; +import java.net.ServerSocket; +import java.security.AccessController; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.zip.CRC32; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.apache.derby.tools.JDBCDisplayUtil; +import org.apache.derbyTesting.functionTests.tests.jdbcapi.resultsetStream.TestOfGetAsciiStream; +import org.apache.derbyTesting.functionTests.tests.tools.ImportExportTest; +import org.apache.derbyTesting.junit.BaseJDBCTestCase; +import org.apache.derbyTesting.junit.CleanDatabaseTestSetup; +import org.apache.derbyTesting.junit.SupportFilesSetup; +import org.apache.derbyTesting.junit.TestConfiguration; + +public class ResultSetStreamTest extends BaseJDBCTestCase { + + public ResultSetStreamTest(String name) { + super(name); + + } + + private static String filePath; + + private static String sep; + + public void testInsertData() throws SQLException, Exception { + try { + + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws SQLException, FileNotFoundException, + IOException { + insertData(); + return null; + } + }); + } catch (PrivilegedActionException e) { + throw e.getException(); + } + } + + /** + * Test insert of data with setBinaryStream + * + * @throws SQLException + * @throws FileNotFoundException + * @throws IOException + */ + private void insertData() throws SQLException, FileNotFoundException, + IOException { + Connection conn = getConnection(); + PreparedStatement ppw = conn + .prepareStatement("insert into t2 (len, data) values (?, ?)"); + filePath = "extin"; + String userDir = System.getProperty("user.dir"); + sep = System.getProperty("file.separator"); + filePath = userDir + sep + filePath; + File file = new File(filePath + sep + "littleclob.utf"); + int fileSize = (int) file.length(); + BufferedInputStream fileData = new BufferedInputStream( + new FileInputStream(file)); + ppw.setInt(1, fileSize); + ppw.setBinaryStream(2, fileData, fileSize); + ppw.executeUpdate(); + fileData.close(); + + file = new File(filePath + sep + "short.utf"); + fileSize = (int) file.length(); + fileData = new BufferedInputStream(new FileInputStream(file)); + ppw.setInt(1, fileSize); + ppw.setBinaryStream(2, fileData, fileSize); + ppw.executeUpdate(); + fileData.close(); + // null binary value + ppw.setInt(1, -1); + ppw.setBinaryStream(2, (java.io.InputStream) null, 0); + ppw.executeUpdate(); + + // value copied over from original Java object test. + File rssg = new java.io.File(filePath + sep + "resultsetStream.gif"); + int rssgLength = (int) rssg.length(); + ppw.setInt(1, (int) rssgLength); + fileData = new BufferedInputStream(new FileInputStream(rssg)); + ppw.setBinaryStream(2, fileData, rssgLength); + ppw.executeUpdate(); + fileData.close(); + + // check binary input streams of invalid length. + // JDBC 3.0 tutorial says stream contents must match length. + + byte[] tooFew = new byte[234]; + + ppw.setInt(1, 234); + ppw.setBinaryStream(2, new java.io.ByteArrayInputStream(tooFew), 234); // matching length + ppw.executeUpdate(); + + + ppw.setInt(1, 235); + ppw.setBinaryStream(2, new java.io.ByteArrayInputStream(tooFew), 235); // too few bytes in stream + try { + ppw.executeUpdate(); + fail("FAIL - execute with setBinaryStream() with too few bytes succeeded"); + } catch (SQLException sqle) { + assertMisMatchStreamLength(sqle); + } + + ppw.setInt(1, 233); + ppw.setBinaryStream(2, new java.io.ByteArrayInputStream(tooFew), 233); // too many bytes + try { + ppw.executeUpdate(); + fail("FAIL - execute with setBinaryStream() with too many bytes succeeded"); + } catch (SQLException sqle) { + assertMisMatchStreamLength(sqle); + } + + ppw.close(); + + } + + private void assertMisMatchStreamLength(SQLException sqle) { + if (usingEmbedded()) { + assertEquals("XSDA4",sqle.getSQLState()); + sqle = sqle.getNextException(); + assertSQLState("XJ001",sqle); + } else { + String state = sqle.getSQLState(); + assertTrue("SQLState not XN015 or XN017 as expected", "XN015".equals(state) || "XN017".equals(state)); + } + } + + public void testBinaryStreamProcessing() throws SQLException, Exception { + try { + + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws SQLException, FileNotFoundException, + IOException { + binaryStreamProcessing(); + return null; + } + }); + } catch (PrivilegedActionException e) { + throw e.getException(); + } + } + + /** + * Test getBinaryStream by comparing chksum of retrieved value. + * + * @throws SQLException + * @throws IOException + */ + public void binaryStreamProcessing() throws SQLException, IOException { + Connection conn = getConnection(); + Statement s = conn.createStatement(); + + filePath = "extin"; + String userDir = System.getProperty("user.dir"); + sep = System.getProperty("file.separator"); + filePath = userDir + sep + filePath; + + File rssg = new java.io.File(filePath + sep + "resultsetStream.gif"); + int rssgLength = (int) rssg.length(); + ResultSet rs = s.executeQuery("select data from t2 where len = " + + rssgLength); + ResultSetMetaData met = rs.getMetaData(); + assertEquals(1, met.getColumnCount()); + + while (rs.next()) { + // JDBC columns use 1-based counting + + // get the first column as a stream + + InputStream is = rs.getBinaryStream(1); + if (is == null) { + fail("FAIL - getBinaryStream() return null"); + break; + } + + // read the first 200 bytes from the stream and checksum them + byte[] b200 = new byte[200]; + + // no guaratees to read all 200 bytes in one read call. + int count = 0; + + while (count < 200) { + int r = is.read(b200, count, 200 - count); + if (r == -1) + break; + count += r; + } + + if (count != 200) { + fail("FAIL - failed to read 200 bytes from known file"); + break; + } + + CRC32 cs = new CRC32(); + + cs.reset(); + cs.update(b200); + assertEquals("Incorrect checksum value", 3061553656L, cs.getValue()); + count = 200; + for (; is.read() != -1; count++) { + } + assertEquals("unexpected size of file", 3470, count); + rs.close(); + // check the stream is closed once another get call is made. + rs = s.executeQuery("select data, len from t2 where len = " + + rssgLength); + met = rs.getMetaData(); + assertEquals(2, met.getColumnCount()); + + while (rs.next()) { + // JDBC columns use 1-based counting + + // get the first column as a stream + is = rs.getBinaryStream(1); + if (is == null) { + fail("FAIL - getBinaryStream() return null"); + break; + } + + // read the first 200 bytes from the stream and checksum them + b200 = new byte[200]; + + // no guaratees to read all 200 bytes in one read call. + count = 0; + + while (count < 200) { + int r = is.read(b200, count, 200 - count); + if (r == -1) + break; + count += r; + } + + if (count != 200) { + fail("FAIL - failed to read 200 bytes from known file"); + break; + } + + cs = new CRC32(); + + cs.reset(); + cs.update(b200); + assertEquals("Incorrect checksum value", 3061553656L, cs + .getValue()); + assertEquals(3470, rs.getInt(2)); + try { + is.read(); + fail("FAIL - stream was not closed after a get*() call. " + + is.getClass()); + break; + } catch (IOException ioe) { + // yes, stream should be closed + } + + } + rs.close(); + + // check a SQL null object gets a null stream + rs = s.executeQuery("select data from t2 where len = -1"); + met = rs.getMetaData(); + assertEquals(1,met.getColumnCount()); + + while (rs.next()) + { + // JDBC columns use 1-based counting + + // get the first column as a stream + + is = rs.getBinaryStream(1); + if (is != null) { + fail("FAIL - getBinaryStream() did not return null for SQL null"); + break; + } + + } + + rs.close(); + File file = new File(filePath + sep + "short.utf"); + int fileSize = (int) file.length(); + rs = s.executeQuery("select len, data from t2 where len = " + + fileSize); + rs.next(); + fileSize = rs.getInt(1); + BufferedInputStream fileData = new BufferedInputStream(rs.getBinaryStream(2)); + int readCount = 0; + while(true) + { + int data = fileData.read(); + if (data == -1) break; + readCount++; + } + fileData.close(); + assertEquals(56, fileSize); + assertEquals(56,readCount); + } + + rs.close(); + s.close(); + + } + final static String TEST_STRING_DATA = + "ABCDEFG" + + "\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5" + + "\u00ff\u0100" + + "\u3042\u3044\u3046\u3048\u304a"; + + public void testGetAsciiStream() throws SQLException, IOException { + Connection conn = getConnection(); + PreparedStatement st; + st = conn.prepareStatement("insert into t3(text_data) values(?)"); + st.setCharacterStream(1, + new StringReader(TEST_STRING_DATA), + TEST_STRING_DATA.length()); + st.executeUpdate(); + st = conn.prepareStatement("select " + + "text_data as text_data_col1," + + "text_data as text_data_col2 " + + "from " + + "t3"); + ResultSet rs = st.executeQuery(); + + while(rs.next()){ + InputStream is = rs.getAsciiStream(1); + int i = 0; + for(int c = is.read(); c > -1; c = is.read()){ + int exp = (int) TEST_STRING_DATA.charAt(i++); + if (exp > 255) + exp = (int) 0x3f; + assertEquals(exp,c); + + } + Statement s = createStatement(); + s.executeUpdate("delete from t3"); + } + + + } + + /** + * test getCharacterStream against inserted data + * + * @throws SQLException + * @throws IOException + */ + public void testGetCharacterStream() throws SQLException, IOException { + Connection conn = getConnection(); + PreparedStatement st; + st = conn.prepareStatement("insert into t3(text_data) values(?)"); + st.setCharacterStream(1, + new StringReader(TEST_STRING_DATA), + TEST_STRING_DATA.length()); + st.executeUpdate(); + st = conn.prepareStatement("select " + + "text_data as text_data_col1," + + "text_data as text_data_col2 " + + "from " + + "t3"); + ResultSet rs = st.executeQuery(); + + while(rs.next()){ + Reader r = rs.getCharacterStream(1); + int i = 0; + for(int c = r.read(); c > -1; c = r.read()){ + int exp = (int) TEST_STRING_DATA.charAt(i++); + assertEquals(exp,c); + } + } + Statement s = createStatement(); + s.executeUpdate("delete from t3"); + + } + + public static Test basesuite(String name) { + TestSuite suite = new TestSuite(ResultSetStreamTest.class, name); + Test test = new SupportFilesSetup(suite, new String[] { + "functionTests/testData/ResultSetStream/littleclob.utf", + "functionTests/testData/ResultSetStream/short.utf", + "functionTests/testData/ResultSetStream/resultsetstream.gif" }); + + return new CleanDatabaseTestSetup(test) { + protected void decorateSQL(Statement s) throws SQLException { + + s.execute("create table t2 (len int, data LONG VARCHAR FOR BIT DATA)"); + s.execute("create table t3(text_data clob)"); + + } + }; + } + + public static Test suite() { + TestSuite suite = new TestSuite("ResultSetStreamTest"); + suite.addTest(basesuite("ResultSetStreamTest:embedded")); + suite.addTest(TestConfiguration.clientServerDecorator(basesuite("ResultSetStreamTest:client"))); + return suite; + + } +} Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetStreamTest.java ------------------------------------------------------------------------------ svn:eol-style = native