Return to Issues Table 

Infinite loop in selectRandomFeatureType(...)

Issue ID#:
925
Category:
WFS 2.0
Type:
Issue
Status:
Fixed - Requires Review
Priority:
High
Entered By:
Fischer, Jean-Michel
Created On:
2014-01-28 08:01:12
Updated By:
Bermudez, Luis
Last Update:
2014-07-24 18:03:33
Assigned To:
Martell, Richard

Original Issue Details:

In the function static QName selectRandomFeatureType(Map<QName, FeatureTypeInfo> featureInfo) in LockFeatureTests.java line: 247 in trunk there is a loop:


while (!typeInfo.isInstantiated()) {
    typeInfo = values[randomIndex.nextInt(values.length)];
}


With some WFS configurations this loop will never end, and the tests hang forever.


As a workaround I commented out the loop and everything was fine.


 


Status: new
Assigned To:
After writing the lines below in the log, the TestNG hangs. Probably is is the loop described above. It is not possible to run the Locking WFS tests.



top on the testmachine says:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19602 ci 20 0 1458m 496m 12m S 100,1 12,5 4:10.72 java

the CPU of this task stays constantly around 100%

This is the jar we use:
https://svn.opengeospatial.org/ogc-projects/cite/maven/org/opengis/cite/ets-wfs/2.0-r14/ets-wfs-2.0-r14.jar

Last Logmessage from Testng:

Mrz 31, 2014 3:14:30 PM com.sun.jersey.api.client.filter.LoggingFilter log
INFO: 5 * Client out-bound request
5 > POST
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><wfs:LockFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" service="WFS" version="2.0.0">
<wfs:StoredQuery id="urn:ogc:def:query:OGC-WFS::GetFeatureByType"><wfs:Parameter xmlns:tns="http://www.interactive-instruments.de/namespaces/cite/wfst" name="typeName">tns:City</wfs:Parameter></wfs:StoredQuery></wfs:LockFeature></soap:Body></soap:Envelope>


Mrz 31, 2014 3:14:31 PM com.sun.jersey.api.client.filter.LoggingFilter log

INFO: 5 * Client in-bound response
5 < 200
5 < Transfer-Encoding: chunked
5 < Date: Mon, 31 Mar 2014 13:14:30 GMT
5 < Content-Disposition: inline; filename="XtraServerLockFeature.xml"
5 < Keep-Alive: timeout=5, max=96
5 < Connection: Keep-Alive
5 < Content-Type: application/soap+xml; charset=utf-8
5 < Server: Apache/2.4.7 (Unix)
5 <
<?xml version="1.0" encoding="utf-8"?>
<wfs:LockFeatureResponse xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://services.interactive-instruments.de/cite2013wfs/schema/ogc/wfs/2.0/wfs.xsd" lockId="6d086f9c-140b-4140-b371-bb2f008345c1">
<wfs:FeaturesLocked>
<fes:ResourceId rid="City.10"/>
<fes:ResourceId rid="City.2"/>
<fes:ResourceId rid="City.3"/>
<fes:ResourceId rid="City.4"/>
<fes:ResourceId rid="City.5"/>
<fes:ResourceId rid="City.6"/>
<fes:ResourceId rid="City.7"/>
<fes:ResourceId rid="City.8"/>
<fes:ResourceId rid="City.9"/>
</wfs:FeaturesLocked>
</wfs:LockFeatureResponse>

Hours Worked: 0.00
Entered By: Fischer, Jean-Michel - 2014-10-23 11:54:13
Status: new
Assigned To: Martell, Richard

I revised the utility methods selectRandomFeatureType() and fetchRandomFeatureIdentifier() in LockFeatureTests. Also added some unit tests in VerifyLockFeatureTests, which all pass.

Hours Worked: 0.00
Entered By: Martell, Richard - 2014-10-23 11:54:13
Status: new
Assigned To: Martell, Richard

I'll replace the use of the unofficial getFeatureByType stored query in lockAllFeaturesByType, since a locking WFS must support general ad hoc queries.

Hours Worked: 0.00
Entered By: Martell, Richard - 2014-10-23 11:54:13
Status: Fixed - Requires Review
Assigned To: Martell, Richard

Fixed in r15. However, none of the known WFS2 implementations advertise ImplementsLockingWFS = TRUE, so this could not be verified against a live WFS.

Hours Worked: 0.00
Entered By: Martell, Richard - 2014-04-11 18:54:20
Status: Fixed - Requires Review
Assigned To: Martell, Richard

Moved to GitHub: https://github.com/opengeospatial/ets-wfs20/issues/5

Hours Worked: 0.00
Entered By: Bermudez, Luis - 2014-07-24 18:03:33