aboutsummaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorAnna Koskinen <anna@vaadin.com>2013-01-09 15:49:20 +0200
committerAnna Koskinen <anna@vaadin.com>2013-01-09 15:49:20 +0200
commit952a77091aeb0820a4235077a14398c83a2827cc (patch)
treee2c2a9720b389e60ae558d7e5e07efbbf15c2da4 /server/tests
parent1a20331682f4495509fa79ad54c96fe77de82eed (diff)
downloadvaadin-framework-952a77091aeb0820a4235077a14398c83a2827cc.tar.gz
vaadin-framework-952a77091aeb0820a4235077a14398c83a2827cc.zip
Merge of (#10032) to Vaadin 7.
SQLContainer and DB2 not handling empty result set metadata correctly. Change-Id: I20ad1e3d528f92826e3f9049403c6a953a6a07c8
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/data/util/sqlcontainer/TicketTests.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/TicketTests.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/TicketTests.java
index 6e95aff027..8e8c83d234 100644
--- a/server/tests/src/com/vaadin/data/util/sqlcontainer/TicketTests.java
+++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/TicketTests.java
@@ -183,4 +183,16 @@ public class TicketTests {
Assert.assertEquals(name, name3);
}
+
+ @Test
+ public void ticket10032_empty_set_metadata_correctly_handled()
+ throws SQLException {
+ // If problem exists will break when method getPropertyIds()
+ // is called in constructor SQLContainer(QueryDelegate delegate).
+ SQLContainer container = new SQLContainer(new FreeformQuery(
+ "SELECT * FROM people WHERE name='does_not_exist'",
+ Arrays.asList("ID"), connectionPool));
+ Assert.assertTrue("Got items while expected empty set",
+ container.size() == 0);
+ }
}