[Mapguide-trac] [mapguide-trac] #2432: Subsequent calls to MaestroApi.HttpServerConnection.QueryFeatureSource timeout

MapGuide Open Source trac_mapguide at osgeo.org
Thu Apr 17 03:47:02 PDT 2014


#2432: Subsequent calls to MaestroApi.HttpServerConnection.QueryFeatureSource
timeout
----------------------------+-----------------------------------------------
   Reporter:  johngalambos  |       Owner:  jng  
       Type:  defect        |      Status:  new  
   Priority:  low           |   Milestone:       
  Component:  Maestro       |     Version:  2.5.0
   Severity:  minor         |    Keywords:       
External_id:                |  
----------------------------+-----------------------------------------------

Comment(by jng):

 I tried these two unit tests. A single-threaded one and a multi-threaded
 one. I cannot trigger the timeout exceptions. Do you have a reproducible
 sample?

 {{{
 [Test]
 public void TestCase2432()
 {
     var conn = CreateTestConnection();
     for (int i = 0; i < 10; i++)
     {
         using (var rdr1 =
 conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource",
 "SHP_Schema:Parcels", "Autogenerated_SDF_ID < 20"))
         {
             while (rdr1.ReadNext()) { }
             rdr1.Close();
         }
     }
 }
 }}}

 {{{
 [Test]
 public void TestCase2432()
 {
     var conn = CreateTestConnection();
     var events = new List<ManualResetEvent>();
     for (int i = 0; i < 10; i++)
     {
         var resetEvent = new ManualResetEvent(false);
         ThreadPool.QueueUserWorkItem((args) =>
         {
             using (var rdr1 =
 conn.FeatureService.QueryFeatureSource("Library://UnitTests/Data/Parcels.FeatureSource",
 "SHP_Schema:Parcels", "Autogenerated_SDF_ID < 20"))
             {
                 while (rdr1.ReadNext()) { }
                 rdr1.Close();
                 resetEvent.Set();
             }
         });
         events.Add(resetEvent);
     }
     WaitHandle.WaitAll(events.ToArray());
 }
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/2432#comment:1>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list