]> granicus.if.org Git - postgis/commitdiff
Allow interruption to take some more time.
authorSandro Santilli <strk@keybit.net>
Thu, 6 Nov 2014 18:41:43 +0000 (18:41 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 6 Nov 2014 18:41:43 +0000 (18:41 +0000)
Also show the lateness when the time test fails.
Hopefully fixes or helps fixing travis build.

git-svn-id: http://svn.osgeo.org/postgis/trunk@13121 b70326c6-7e19-0410-871a-916f4a2858ee

regress/interrupt.sql
regress/interrupt_expected

index dfb87299a1425631fe862889a786059c74f88853..5563bfb46805bf9b6cdcb6d5cf4cf6ca4e70843e 100644 (file)
@@ -6,15 +6,23 @@ select ST_Buffer(g,100) from (
   select (st_dumppoints(st_buffer(st_makepoint(0,0),10000,100000))).geom g
 ) foo;
 
-SELECT 'buffer_interrupted_on_time', now()-t < '150ms'::interval
-FROM _time; UPDATE _time SET t = now();
+-- it may take some more to interrupt st_buffer, see
+-- https://travis-ci.org/postgis/postgis/builds/40211116#L2222-L2223
+SELECT CASE WHEN now()-t < '200ms'::interval THEN
+    'buffer interrupted on time'
+  ELSE
+    'buffer interrupted late: ' || ( now()-t )::text
+  END FROM _time; UPDATE _time SET t = now();
 
 SELECT
 ST_Segmentize(ST_MakeLine(ST_MakePoint(4,39), ST_MakePoint(1,41)),
   1e-100);
 
-SELECT 'segmentize_interrupted_on_time', now()-t < '150ms'::interval
-FROM _time; UPDATE _time SET t = now();
+SELECT CASE WHEN now()-t < '150ms'::interval THEN
+    'segmentize interrupted on time'
+  ELSE
+    'segmentize interrupted late: ' || ( now()-t )::text
+  END FROM _time; UPDATE _time SET t = now();
 
 SET statement_timeout TO 0;
 
index 2e479ab94e01be529e8c5ca82cec5c10c4283851..adf8e75e1ff1598fc7c56d5bce8f442bcae954e4 100644 (file)
@@ -1,6 +1,6 @@
 ERROR:  canceling statement due to statement timeout
-buffer_interrupted_on_time|t
+buffer interrupted on time
 NOTICE:  liblwgeom code interrupted
 ERROR:  canceling statement due to statement timeout
-segmentize_interrupted_on_time|t
+segmentize interrupted on time
 1|LINESTRING(0 0,2 0,4 0)