GML3ParsingTest fails when local GeoServer is running
-----------------------------------------------------

                 Key: GEOT-2456
                 URL: http://jira.codehaus.org/browse/GEOT-2456
             Project: GeoTools
          Issue Type: Bug
          Components: data gml
    Affects Versions: 2.5.5
         Environment: Sun Java 1.5.0_18  i386 , CentOS 5.3 , Maven 2.0.9
            Reporter: Arne Kepp
            Priority: Minor


I was building GeoTools 2.5.x on Atlas to run CITE tests. Tomcat was running 
with GeoServer in the background, resulting in the failure below. Stopping 
Tomcat appears to solve the problem. 


Running org.geotools.gml3.GML3ParsingTest
Apr 22, 2009 6:28:34 AM org.geotools.xml.impl.ParserHandler startElement
WARNING: Error parsing: 
http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.054 sec <<< 
FAILURE!

Error says
{code} 
-------------------------------------------------------------------------------
Test set: org.geotools.gml3.GML3ParsingTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.054 sec <<< 
FAILURE!
testWithoutSchema(org.geotools.gml3.GML3ParsingTest)  Time elapsed: 1.043 sec  
<<< FAILURE!
junit.framework.AssertionFailedError: null
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.assertTrue(Assert.java:20)
        at junit.framework.Assert.assertTrue(Assert.java:27)
        at 
org.geotools.gml3.GML3ParsingTest.testWithoutSchema(GML3ParsingTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
        at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
        at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
{code} 


The failing part is the assertTrue in the code below:
{code} 
   public void testWithoutSchema() throws Exception {
        InputStream in = getClass().getResourceAsStream( "states.xml");
        GMLConfiguration gml = new GMLConfiguration();
        StreamingParser parser = new StreamingParser( gml, in, 
SimpleFeature.class );

        int nfeatures = 0;
        SimpleFeature f = null;
        while( ( f = (SimpleFeature) parser.parse() ) != null ) {
            nfeatures++;
            assertNotNull( f.getAttribute( "STATE_NAME"));
            assertNotNull( f.getAttribute( "STATE_ABBR"));
            assertTrue( f.getAttribute( "SAMP_POP") instanceof String );
        }

        assertEquals( 49, nfeatures );
    }
{code} 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to