Author: davsclaus Date: Wed Dec 14 04:32:29 2011 New Revision: 1214052 URL: http://svn.apache.org/viewvc?rev=1214052&view=rev Log: Fixed test in camel-jdbc
Modified: camel/branches/camel-2.8.x/ (props changed) camel/branches/camel-2.8.x/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcOptionsTest.java Propchange: camel/branches/camel-2.8.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Dec 14 04:32:29 2011 @@ -1 +1 @@ -/camel/trunk:1202148,1202167,1202204-1202206,1202214-1202215,1202223,1202659,1202685,1203879,1203978,1204338,1205124,1205372,1205412,1205429,1205431,1205713,1206116,1206414,1207743,1207784,1208301,1208930,1208964-1208965,1209006-1209007,1209382,1209401,1209477,1209845-1209846,1210113,1210771,1210830,1211363,1211414,1211773,1211811,1212275-1212276,1212408,1213197,1213219,1213232,1213526 +/camel/trunk:1202148,1202167,1202204-1202206,1202214-1202215,1202223,1202659,1202685,1203879,1203978,1204338,1205124,1205372,1205412,1205429,1205431,1205713,1206116,1206414,1207743,1207784,1208301,1208930,1208964-1208965,1209006-1209007,1209382,1209401,1209477,1209845-1209846,1210113,1210391,1210771,1210830,1211363,1211414,1211773,1211811,1212275-1212276,1212408,1213197,1213219,1213232,1213526 Propchange: camel/branches/camel-2.8.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.8.x/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcOptionsTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcOptionsTest.java?rev=1214052&r1=1214051&r2=1214052&view=diff ============================================================================== --- camel/branches/camel-2.8.x/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcOptionsTest.java (original) +++ camel/branches/camel-2.8.x/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcOptionsTest.java Wed Dec 14 04:32:29 2011 @@ -83,32 +83,6 @@ public class JdbcOptionsTest extends Cam assertEquals(4, list.size()); } - @SuppressWarnings("rawtypes") - @Test - public void testInsertRollback() throws Exception { - // insert 2 records - try { - template.sendBody("direct:startTx", "insert into customer values ('cust3', 'johnsmith');insert into customer values ('cust3', 'hkesler')"); - fail("Should have thrown a CamelExecutionException"); - } catch (CamelExecutionException e) { - if (!e.getCause().getMessage().contains("Violation of unique constraint")) { - fail("Test did not throw the expected Constraint Violation Exception"); - } - } - - // check to see that they failed by getting a rec count from table - MockEndpoint mockTest = getMockEndpoint("mock:retrieve"); - mockTest.expectedMessageCount(1); - - template.sendBody("direct:retrieve", "select * from customer"); - - mockTest.assertIsSatisfied(); - - List list = mockTest.getExchanges().get(0).getIn().getBody(ArrayList.class); - // all recs failed to insert - assertEquals(2, list.size()); - } - @Test public void testNoDataSourceInRegistry() throws Exception { try { @@ -151,12 +125,8 @@ public class JdbcOptionsTest extends Cam @Before public void setUp() throws Exception { - Properties connectionProperties = new Properties(); - connectionProperties.put("autoCommit", Boolean.TRUE); - DriverManagerDataSource dataSource = new SingleConnectionDataSource(url, user, password, true); dataSource.setDriverClassName(driverClass); - dataSource.setConnectionProperties(connectionProperties); ds = dataSource; JdbcTemplate jdbc = new JdbcTemplate(ds);