summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-05-15 22:59:05 +0300
committerVaadin Code Review <review@vaadin.com>2015-05-18 16:48:06 +0000
commitba07f4f689b61f304f8b92696c8ce2d53724a311 (patch)
treed40baa888a9d342ab44f31d11fb69309474abd29 /server/tests
parent05d294e6152963d45262d06c727f977e0901d723 (diff)
downloadvaadin-framework-ba07f4f689b61f304f8b92696c8ce2d53724a311.tar.gz
vaadin-framework-ba07f4f689b61f304f8b92696c8ce2d53724a311.zip
Do not leave transaction open if remove fails (#17858)
Change-Id: Iae9243bd0dc90e130e2866adef472a4d09c4a16f
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
index 92d0c49205..b2cc9a5d0c 100644
--- a/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
+++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
@@ -99,23 +99,14 @@ public class SQLContainerTableQueryTest {
assertTrue(container.removeItem(container.lastItemId()));
}
- @Test
+ @Test(expected = SQLException.class)
public void itemWithNonExistingVersionColumnCannotBeRemoved()
throws SQLException {
query.setVersionColumn("version");
container.removeItem(container.lastItemId());
- // FIXME Remove try-catch when https://dev.vaadin.com/ticket/17858 is
- // fixed
- try {
- container.commit();
- Assert.fail("Commit should not succeed when version column does not exist");
- } catch (IllegalArgumentException e) {
- // This should not be here at all as commit() should not leave the
- // transaction open!
- container.getQueryDelegate().rollback();
- }
+ container.commit();
}
@Test