diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/src/com/vaadin/data/util/sqlcontainer/TicketTests.java | 12 |
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); + } } |