rdf-pipeline / framework

Automatically exported from code.google.com/p/rdf-pipeline
Apache License 2.0
4 stars 1 forks source link

Test 0019 fails sometimes -- 0018 also #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Restart apache2, then run-test.perl 0* and 0019 fails with the following 
differences in /tmp/rdfp/diffs.txt:

=================== 0019_Query_parameters_with_filter ===================
diff -b -w  
'/tmp/rdfp/0019_Query_parameters_with_filter/expected-filtered/cache/cardiology/
state' 
'/tmp/rdfp/0019_Query_parameters_with_filter/actual-filtered/cache/cardiology/st
ate'
4,6d3
< Lab   id=002  glucose=85  date=2012-02-02
< Lab   id=002  glucose=94  date=2012-02-03
< Lab   id=005  glucose=98  date=2012-02-02
diff -b -w  
'/tmp/rdfp/0019_Query_parameters_with_filter/expected-filtered/cache/immunology/
state' 
'/tmp/rdfp/0019_Query_parameters_with_filter/actual-filtered/cache/immunology/st
ate'
4,6d3
< Lab   id=004  glucose=72  date=2012-03-01
< Lab   id=004  glucose=104 date=2012-03-02
< Lab   id=004  glucose=95  date=2012-03-03
diff -b -w  
'/tmp/rdfp/0019_Query_parameters_with_filter/expected-filtered/cache/labs/state'
 '/tmp/rdfp/0019_Query_parameters_with_filter/actual-filtered/cache/labs/state'
1,7c1
< Labs PATTERN: key=(002|003|004|005)
< Lab   key=002 glucose=85  date=2012-02-02
< Lab   key=002 glucose=94  date=2012-02-03
< Lab   key=004 glucose=72  date=2012-03-01
< Lab   key=004 glucose=104 date=2012-03-02
< Lab   key=004 glucose=95  date=2012-03-03
< Lab   key=005 glucose=98  date=2012-02-02

---
> Labs PATTERN: id=(002|005)
diff -b -w  
'/tmp/rdfp/0019_Query_parameters_with_filter/expected-filtered/cache/merge/state
' 
'/tmp/rdfp/0019_Query_parameters_with_filter/actual-filtered/cache/merge/state'
1c1
< Patients PATTERN: id=(002|003|004|005)

---
> Patients PATTERN: id=(002|005)
3,4d2
< Patient   id=003  name=Carol  dob=1944-06-12
< Patient   id=004  name=Doug   dob=1949-08-27
6,12c4
< Labs PATTERN: id=(002|003|004|005)
< Lab   id=002  glucose=85  date=2012-02-02
< Lab   id=002  glucose=94  date=2012-02-03
< Lab   id=004  glucose=72  date=2012-03-01
< Lab   id=004  glucose=104 date=2012-03-02
< Lab   id=004  glucose=95  date=2012-03-03
< Lab   id=005  glucose=98  date=2012-02-02

---
> Labs PATTERN: id=(002|005)
diff -b -w  
'/tmp/rdfp/0019_Query_parameters_with_filter/expected-filtered/cache/patients/st
ate' 
'/tmp/rdfp/0019_Query_parameters_with_filter/actual-filtered/cache/patients/stat
e'
1c1
< Patients PATTERN: id=(002|003|004|005)

---
> Patients PATTERN: id=(002|005)
3,4d2
< Patient   id=003  name=Carol  dob=1944-06-12
< Patient   id=004  name=Doug   dob=1949-08-27
diff -b -w  
'/tmp/rdfp/0019_Query_parameters_with_filter/expected-filtered/test/apacheError.
log' 
'/tmp/rdfp/0019_Query_parameters_with_filter/actual-filtered/test/apacheError.lo
g'
59,60c59,60
<               NO CHANGE to query parameters of http://localhost/node/merge
<                   NO CHANGE to query parameters of http://localhost/node/labs

---
>               UPDATED query parameters of http://localhost/node/merge
>                   UPDATED query parameters of http://localhost/node/labs
62c62,63
<               NO CHANGE to depUri http://localhost/node/labs of 
http://localhost/node/merge

---
>                 UPDATING http://localhost/node/labs {labs-updater} state: 
/home/dbooth/rdf-pipeline/trunk/www/cache/labs/state
>               UPDATED depUri http://localhost/node/labs of 
http://localhost/node/merge
64c65
<                   NO CHANGE to query parameters of 
http://localhost/node/patients

---
>                   UPDATED query parameters of http://localhost/node/patients
66c67,69
<               NO CHANGE to depUri http://localhost/node/patients of 
http://localhost/node/merge

---
>                 UPDATING http://localhost/node/patients {patients-updater} 
state: /home/dbooth/rdf-pipeline/trunk/www/cache/patients/state
>               UPDATED depUri http://localhost/node/patients of 
http://localhost/node/merge
>             UPDATING http://localhost/node/merge {merge-updater} state: 
/home/dbooth/rdf-pipeline/trunk/www/cache/merge/state
diff -b -w  
'/tmp/rdfp/0019_Query_parameters_with_filter/expected-filtered/test/testout' 
'/tmp/rdfp/0019_Query_parameters_with_filter/actual-filtered/test/testout'
6c6
< Content-Length: 220

---
> Content-Length: 106
14,16d13
< Lab   id=002  glucose=85  date=2012-02-02
< Lab   id=002  glucose=94  date=2012-02-03
< Lab   id=005  glucose=98  date=2012-02-02
23c20
< Content-Length: 220

---
> Content-Length: 106
31,33d27
< Lab   id=002  glucose=85  date=2012-02-02
< Lab   id=002  glucose=94  date=2012-02-03
< Lab   id=005  glucose=98  date=2012-02-02
40c34
< Content-Length: 222

---
> Content-Length: 107
48,50d41
< Lab   id=004  glucose=72  date=2012-03-01
< Lab   id=004  glucose=104 date=2012-03-02
< Lab   id=004  glucose=95  date=2012-03-03
57c48
< Content-Length: 222

---
> Content-Length: 107
65,67d55
< Lab   id=004  glucose=72  date=2012-03-01
< Lab   id=004  glucose=104 date=2012-03-02
< Lab   id=004  glucose=95  date=2012-03-03
74c62
< Content-Length: 220

---
> Content-Length: 106
82,84d69
< Lab   id=002  glucose=85  date=2012-02-02
< Lab   id=002  glucose=94  date=2012-02-03
< Lab   id=005  glucose=98  date=2012-02-02

Original issue reported on code.google.com by david@dbooth.org on 4 Jan 2014 at 3:22

dbooth-boston commented 9 years ago

Fixed in b4d427134678bee216cab9eb2cb9ffafda2ed6b9 .

The problem was that Pipeline.pm was not detecting a changed pipeline.ttl when going from one regression test to another, because different reg tests had different pipeline.ttl files with the exact same modification times. This may have been caused by copying (cp -rp) one test dir to create another, or it may have been caused by git setting file mod times the same.

This is not very likely to happen in production, because normally the file modification time will change if the pipeline.ttl is changed. However, as an additional check it would be good to enhance Pipeline.pm to check the file size when it checks for changes. In theory it could to an MD5 checksum, but that would mean reading the file and doing that computation on every request instead of only looking at file metadata.

dbooth-boston commented 9 years ago

See https://github.com/rdf-pipeline/framework/issues/127