| Joe Weinstein 2005-10-12, 11:23 am |
|
jef wrote:
> The following JUnit code fails:
> // elided ...
> public void testSelectMethod()
> {
> SQLServerDataSource source = new SQLServerDataSource(
);
> source.setSelectMethod("cursor");
> assertEquals("cursor", source.getSelectMethod());
> }
> // elided ...
>
> with:
>
> junit.framework.ComparisonFailure: Select method not set to cursor
Check the docs. I believe SelectMethod=cursor is now functionally
meaningless with this version of the driver, and maybe they allow
you to make the set call, just so it doesn't break existing code
that was written for the previous driver, that shares zero code
with this new one. They might also document that getSelectMethod()
will do what it does...
I think the best course is to verify my first contention, and
then just not call either method for this one....
Joe Weinstein at BEA
> expected:<cursor> but was:<null>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at test.foo.assumptions.JTASQLTest. testSelectMethod(JTA
SQLTest.java:49)
> at sun.reflect. NativeMethodAccessor
Impl.invoke0(Native Method)
> at
> sun.reflect. NativeMethodAccessor
Impl. invoke(NativeMethodA
ccessorImpl.java:39)
> at
> sun.reflect. DelegatingMethodAcce
ssorImpl. invoke(DelegatingMet
hodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult. runProtected(TestRes
ult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. runTests(RemoteTestR
unner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. run(RemoteTestRunner
.java:344)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. main(RemoteTestRunne
r.java:196)
>
>
|