You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2026/04/18 21:19:31 UTC
(groovy) 02/02: GROOVY-7768: regression test for callWithAllRows with input-only params
This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 4a57272e43772bc4991712df921a49ff8eb0de36
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun Apr 19 07:02:05 2026 +1000
GROOVY-7768: regression test for callWithAllRows with input-only params
The reporter's original failure was driver-specific (SQL Server + non-portable
`sp_who ?` syntax rather than the JDBC escape `{call sp_who(?)}`). The HSQLDB
equivalent using the portable syntax returns rows correctly, so this commit
adds coverage to lock in that behaviour. Propose closing GROOVY-7768 as
Cannot Reproduce.
---
.../src/test/groovy/groovy/sql/SqlCallTest.groovy | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/subprojects/groovy-sql/src/test/groovy/groovy/sql/SqlCallTest.groovy b/subprojects/groovy-sql/src/test/groovy/groovy/sql/SqlCallTest.groovy
index 2b1bac7969..b61e78ebab 100644
--- a/subprojects/groovy-sql/src/test/groovy/groovy/sql/SqlCallTest.groovy
+++ b/subprojects/groovy-sql/src/test/groovy/groovy/sql/SqlCallTest.groovy
@@ -300,6 +300,20 @@ class SqlCallTest extends GroovyTestCase {
assert lastRows[0].lastname == 'Ventura'
}
+ // GROOVY-7768
+ void testCallWithAllRowsWithInputParamOnly() {
+ List<List<GroovyRowResult>> rowList = sql.callWithAllRows('{call FindAllByFirst(?)}', ['J'], { /* no out params */ })
+ assert rowList.size() == 1
+ def rows = rowList[0]
+ assert rows.size() == 2
+ assert rows[0].id == 1
+ assert rows[0].firstname == 'James'
+ assert rows[0].lastname == 'Strachan'
+ assert rows[1].id == 4
+ assert rows[1].firstname == 'Jean'
+ assert rows[1].lastname == 'Gabin'
+ }
+
void testCallWithStatementCaching() {
String sqlText = '{call FindByFirst(?, ?)}'
CallableStatement statement = null