@Test
public void testFeatureWriter_RowIDSDE_Transaction() throws IOException,
UnavailableConnectionException {
final String tableName = seRowidSdeTable;
final Transaction transaction = new DefaultTransaction();
try {
FeatureWriter<SimpleFeatureType, SimpleFeature> writer;
writer = addFeatures(tableName, transaction);
/*
* This one works regardless of the database being MSSQL or not because the table IS
* being created as versioned by testData.createTestTable.
* <http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=32190>
*/
assertEquals(0, ds.getFeatureSource(tableName).getCount(Query.ALL));
transaction.commit();
writer.close();
assertEquals(2, ds.getFeatureSource(tableName).getCount(Query.ALL));
} finally {
transaction.close();
}
}