Skip to content

Commit 500d526

Browse files
fix for failing test
1 parent 3044488 commit 500d526

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/org/codehaus/groovy/grails/orm/hibernate/MappingDslTests.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.codehaus.groovy.grails.orm.hibernate
22

33
import javax.sql.DataSource
4+
import java.sql.Types
45

56
/**
67
* @author Graeme Rocher
@@ -125,9 +126,9 @@ class MappingDslTests extends AbstractGrailsHibernateTests {
125126
def result = statement.executeQuery()
126127
assertTrue result.next()
127128
def metadata = result.getMetaData()
128-
assertEquals "FIRST_NAME",metadata.getColumnLabel(4)
129-
// hsqldb returns -1 for text type, if it wasn't mapped as text it would be 12 so this is an ok test
130-
assertEquals( -1, metadata.getColumnType(4) )
129+
assertEquals "FIRST_NAME",metadata.getColumnLabel(3)
130+
// hsqldb returns LONGVARCHAR for text type, if it wasn't mapped as text it would be VARCHAR so this is an ok test
131+
assertEquals( Types.LONGVARCHAR, metadata.getColumnType(3) )
131132
}
132133
finally {
133134
con.close()

0 commit comments

Comments
 (0)