Closed wmene closed 10 years ago
The method Fixtures::SuiteTest::Entry#documentLoader sometimes fails when it grabs test-suites. The content_type from the response https://github.com/ruby-rdf/json-ld/blob/develop/spec/suite_helper.rb#L256 is sometimes nil.
Fixtures::SuiteTest::Entry#documentLoader
content_type
response
nil
When content_type is nil, then the call to start_with? fails here https://github.com/ruby-rdf/json-ld/blob/develop/spec/suite_helper.rb#L266
start_with?
This is the stack trace I see for one failing spec:
135) JSON::LD test suite Transform JSON-LD to RDF toRdf-0118-in.jsonld: produce generalized RDF flag Failure/Error: t.run self NoMethodError: undefined method `start_with?' for nil:NilClass # ./spec/suite_helper.rb:266:in `block (2 levels) in documentLoader' # ./spec/suite_helper.rb:252:in `block in documentLoader' # ./spec/suite_helper.rb:250:in `documentLoader' # ./spec/suite_helper.rb:60:in `block (2 levels) in <class:Entry>' # ./spec/suite_helper.rb:121:in `run' # ./spec/suite_to_rdf_spec.rb:12:in `block (5 levels) in <top (required)>'
Thanks, my "optimized" test-suite infrastructure hid this issue from me. The server's not returning a Content-Type (which it should), and this hit that particular code.
The method
Fixtures::SuiteTest::Entry#documentLoader
sometimes fails when it grabs test-suites. Thecontent_type
from theresponse
https://github.com/ruby-rdf/json-ld/blob/develop/spec/suite_helper.rb#L256 is sometimesnil
.When
content_type
isnil
, then the call tostart_with?
fails here https://github.com/ruby-rdf/json-ld/blob/develop/spec/suite_helper.rb#L266This is the stack trace I see for one failing spec: