Cory Horner wrote:
> I'll do some testing in a few minutes.

Ran "mvn install" on gt2-2.4-M0-src.zip, and got this in demo/property:

-------------------------------------------------------------------------------
Test set: org.geotools.data.property.PropertyDataStoreTest
-------------------------------------------------------------------------------
Tests run: 15, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.078 
sec <<< FAILURE!
testTransaction(org.geotools.data.property.PropertyDataStoreTest)  Time 
elapsed: 0.062 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<4> but was:<3>
         at junit.framework.Assert.fail(Assert.java:47)
         at junit.framework.Assert.failNotEquals(Assert.java:282)
         at junit.framework.Assert.assertEquals(Assert.java:64)
         at junit.framework.Assert.assertEquals(Assert.java:201)
         at junit.framework.Assert.assertEquals(Assert.java:207)
         at 
org.geotools.data.property.PropertyDataStoreTest.testTransaction(PropertyDataStoreTest.java:388)

----

The failing test is as follows:

     public void testTransaction() throws Exception {
         Transaction t1 = new DefaultTransaction();
         Transaction t2 = new DefaultTransaction();

         FeatureType type = store.getSchema( "road" );
         FeatureStore road = (FeatureStore) store.getFeatureSource("road");
         FeatureStore road1 = (FeatureStore) store.getFeatureSource("road");
         FeatureStore road2 = (FeatureStore) store.getFeatureSource("road");

         road1.setTransaction( t1 );
         road2.setTransaction( t2 );

         Filter filter1 = 
FilterFactoryFinder.createFilterFactory().createFidFilter("fid1");
         Filter filter2 = 
FilterFactoryFinder.createFilterFactory().createFidFilter("fid2");

         Feature feature =
             type.create( new Object[]{ new Integer(5), "chris"}, "fid5" );

         assertEquals( 4, road.getFeatures().size() );
         assertEquals( 4, road1.getFeatures().size() );
         assertEquals( 4, road2.getFeatures().size() );

         road1.removeFeatures( filter1 ); // road1 removes fid1 on t1
         assertEquals( 4, road.getFeatures().size() );
         assertEquals( 3, road1.getFeatures().size() );
         assertEquals( 4, road2.getFeatures().size() );

         road2.addFeatures( DataUtilities.collection( feature )); // 
road2 adds fid5 on t2

         assertEquals( 4, road.getFeatures().size() );
         assertEquals( 3, road1.getFeatures().size() );
         assertEquals( 5, road2.getFeatures().size() );

         t1.commit();
         assertEquals( 3, road.getFeatures().size() );
         assertEquals( 3, road1.getFeatures().size() );
         assertEquals( 4, road2.getFeatures().size() );

         t2.commit();
 >>>>>   assertEquals( 4, road.getFeatures().size() );
         assertEquals( 4, road1.getFeatures().size() );
         assertEquals( 4, road2.getFeatures().size() );
     }


----

It fails on the third to last assertEquals statement, after t2.commit().

SKILL TESTING QUESTION: "what are the correct values for the last 3 
assertions?"

Thanks,
Cory.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to