Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.2-RC2
-
Fix Version/s: 2.5-M1
-
Component/s: arcsde plugin
-
Labels:None
-
Environment:ArcSDE 9.1 Oracle 10g
Description
The method testFeatureWriterAutoCommit udate first the existing 8 features before it insert 2 new features
The reason is that the code call a FeatureReader with Filter.NONE as default, but if you make the following call the method fired a NullPointerExceptio (see http://jira.codehaus.org/browse/GEOT-841).
FeatureWriter writer = ds.getFeatureWriter(typeName,Filter.ALL, Transaction.AUTO_COMMIT);
The following method implementation works.
private void testFeatureWriterAutoCommit(Class geometryClass) throws Exception {
//the table created here is test friendly since it can hold
//any kind of geometries.
this.testData.createTemptTable(true);
String typeName = this.testData.getTemp_table();
FeatureCollection features = this.testData.createTestFeatures(geometryClass, 10);
DataStore ds = this.testData.getDataStore();
FeatureSource fsource = ds.getFeatureSource(typeName);
if (!(fsource instanceof FeatureStore))
FeatureStore featureStore = (FeatureStore) fsource;
final int initialCount = fsource.getCount(Query.ALL);
featureStore.addFeatures(features);
//was the features really inserted?
int fcount = fsource.getCount(Query.ALL);
assertEquals(features.size() + initialCount, fcount);
/*String msg = "a FEATURES_ADDED event should have been called "
+ features.size() + " times";
assertEquals(msg, features.size(), featureAddedEventCount[0]);*/
}
Issue Links
- is depended upon by
-
GEOT-1591
ArcSDE Transaction Diff is not implemented
-