Hi Eranda,
Thanks for converting this test. In pushing this problem forward, it
would be good to know more about the extra dependencies which turn up in
your converted test. The original dependencies are the dependencies
between the consistency checking function and the statement which
invokes it. I am attaching a diff file which you can apply to your
codeline. This should help you see the extra dependencies.
You may need to tweak this further in order to get more information. In
particular, the output is truncated both by the length of the return
value from the consistency checking function and by the
MAXIMUMDISPLAYWIDTH of the ij lines. You can adjust these parameters in
the inbetween.sql script.
Hope this helps,
-Rick
Eranda Sooriyabandara wrote:
---------- Forwarded message ----------
From: *Eranda Sooriyabandara* <[email protected]
<mailto:[email protected]>>
Date: Thu, Jul 23, 2009 at 11:34 PM
Subject: Re: [jira] Updated: (DERBY-4318) convert inbetween.sql to JUNIT
To: "Eranda Sooriyabandara (JIRA)" <[email protected]
<mailto:[email protected]>>
Hi,
I found a big problem with the unconverted codings in converting, ij>
-- check consistency of scans, etc. values ConsistencyChecker(); 1
--------------------------- No open scans, etc.
2 dependencies found
I use the code as,
rs = st.executeQuery(
"values ConsistencyChecker()");
expRS = new String [][]
{
{"No open scans, etc. 2 dependencies found"}
};
JDBC.assertFullResultSet(rs, expRS, true);
the result failure was
test_inbetween(org.apache.derbyTesting.functionTests.tests.lang.InbetweenTest)junit.framework.AssertionFailedError:
C
olumn value mismatch @ column '1', row 1:
Expected: >No open scans, etc. 2 dependencies found<
Found: >No open scans, etc.
46 dependencies found<
What can I do for the make that test success.
Thanks
Eranda
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/lang/inbetween.sql
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/lang/inbetween.sql
(revision 798152)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/inbetween.sql
(working copy)
@@ -23,7 +23,7 @@
-- compatibility with dynamic parameters
set isolation to rr;
-CREATE FUNCTION ConsistencyChecker() RETURNS VARCHAR(128)
+CREATE FUNCTION ConsistencyChecker() RETURNS VARCHAR(20000)
EXTERNAL NAME
'org.apache.derbyTesting.functionTests.util.T_ConsistencyChecker.runConsistencyChecker'
LANGUAGE JAVA PARAMETER STYLE JAVA;
autocommit off;
@@ -147,6 +147,7 @@
delete from s where i between 3 and 5;
select * from s;
+MAXIMUMDISPLAYWIDTH 2000;
-- check consistency of scans, etc.
values ConsistencyChecker();
Index:
java/testing/org/apache/derbyTesting/functionTests/util/T_ConsistencyChecker.java
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/util/T_ConsistencyChecker.java
(revision 798152)
+++
java/testing/org/apache/derbyTesting/functionTests/util/T_ConsistencyChecker.java
(working copy)
@@ -504,6 +504,8 @@
{
debugBuf.append("No outstanding dependencies.\n");
}
+
+ debugBuf.append( " " + dm.dumpDependencies() );
return debugBuf.toString();
}