cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkazimirc...@apache.org
Subject cayenne git commit: CAY-2053 Need to trim CHAR values returned by database before comparing in unit tests, as some dbs use space padding to match the declared column length
Date Fri, 22 Jan 2016 21:48:38 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 763a42f66 -> 244dc6cd9


CAY-2053 Need to trim CHAR values returned by database before comparing in unit tests, as
some dbs use space padding to match the declared column length


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/244dc6cd
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/244dc6cd
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/244dc6cd

Branch: refs/heads/master
Commit: 244dc6cd9fe215696899d97b5495bfa7119c2ae4
Parents: 763a42f
Author: Dzmitry Kazimirchyk <dkazimirchyk@apache.org>
Authored: Sat Jan 23 00:46:35 2016 +0300
Committer: Dzmitry Kazimirchyk <dkazimirchyk@apache.org>
Committed: Sat Jan 23 00:47:20 2016 +0300

----------------------------------------------------------------------
 .../src/test/java/org/apache/cayenne/query/SQLExecIT.java      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/244dc6cd/cayenne-server/src/test/java/org/apache/cayenne/query/SQLExecIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SQLExecIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/SQLExecIT.java
index 8e0eeb8..f8972ad 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SQLExecIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SQLExecIT.java
@@ -58,7 +58,7 @@ public class SQLExecIT extends ServerCase {
                 .paramsArray("a3").update(context);
 
         assertEquals(1, inserted);
-        assertEquals("a3", dbHelper.getString("ARTIST", "ARTIST_NAME"));
+        assertEquals("a3", dbHelper.getString("ARTIST", "ARTIST_NAME").trim());
     }
 
     @Test
@@ -68,7 +68,7 @@ public class SQLExecIT extends ServerCase {
                 .paramsArray(55, "a3").update(context);
 
         assertEquals(1, inserted);
-        assertArrayEquals(new Object[]{55l, "a3"},
-                dbHelper.select("ARTIST", new String[]{"ARTIST_ID", "ARTIST_NAME"}));
+        assertEquals(55l, dbHelper.getLong("ARTIST", "ARTIST_ID"));
+        assertEquals("a3", dbHelper.getString("ARTIST", "ARTIST_NAME").trim());
     }
 }


Mime
View raw message