提交 67ad9c50 编写于 作者: Z zyyang

change

上级 bf8ae909
......@@ -349,7 +349,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet
if (isClosed())
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED);
return false;
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD);
}
@Override
......@@ -357,7 +357,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet
if (isClosed())
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED);
return false;
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD);
}
@Override
......@@ -365,7 +365,7 @@ public abstract class AbstractResultSet extends WrapperImpl implements ResultSet
if (isClosed())
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED);
return false;
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNSUPPORTED_METHOD);
}
@Override
......
......@@ -259,10 +259,12 @@ public class RestfulResultSetTest {
rs.previous();
}
@Test(expected = SQLException.class)
@Test
public void setFetchDirection() throws SQLException {
rs.setFetchDirection(ResultSet.FETCH_FORWARD);
Assert.assertEquals(ResultSet.FETCH_FORWARD, rs.getFetchDirection());
rs.setFetchDirection(ResultSet.FETCH_UNKNOWN);
Assert.assertEquals(ResultSet.FETCH_FORWARD, rs.getFetchDirection());
}
@Test
......@@ -270,14 +272,15 @@ public class RestfulResultSetTest {
Assert.assertEquals(ResultSet.FETCH_FORWARD, rs.getFetchDirection());
}
@Test(expected = SQLException.class)
@Test
public void setFetchSize() throws SQLException {
rs.setFetchSize(0);
Assert.assertEquals(0, rs.getFetchSize());
}
@Test
public void getFetchSize() throws SQLException {
Assert.assertEquals(1, rs.getFetchSize());
Assert.assertEquals(0, rs.getFetchSize());
}
@Test
......@@ -528,7 +531,10 @@ public class RestfulResultSetTest {
@Test(expected = SQLFeatureNotSupportedException.class)
public void getNString() throws SQLException {
rs.getNString("f1");
String f10 = rs.getNString("f10");
Assert.assertEquals("涛思数据", f10);
f10 = rs.getNString(10);
Assert.assertEquals("涛思数据", f10);
}
@Test(expected = SQLFeatureNotSupportedException.class)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册