[
https://issues.apache.org/jira/browse/COUCHDB-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13563572#comment-13563572
]
Joan Touzet commented on COUCHDB-813:
-------------------------------------
We do not return empty if maps terminate abnormally anymore.
In fact, we actually already have a test for this at
https://github.com/apache/couchdb/blob/master/test/view_server/query_server_spec.rb#L604-L617
which matches the current behaviour.
Suggest we close this out?
> No View Server test for error in map function
> ---------------------------------------------
>
> Key: COUCHDB-813
> URL: https://issues.apache.org/jira/browse/COUCHDB-813
> Project: CouchDB
> Issue Type: Bug
> Components: Test Suite
> Affects Versions: 0.11
> Reporter: Stephen Prater
> Priority: Minor
> Fix For: 1.3
>
>
> There is no r-spec test for how a view server should behave if an error is
> thrown in the map function. The JS server returns empty if map terminates
> abnormally so, I've codified that behavior in an rspec test.
> it "should return empty if map terminates abnormally" do
> @qs.reset!
> @qs.run(["add_fun", functions["error-in-map"]]).should == true
> @qs.run(["add_fun", functions["emit-once"]]).should == true
> rows = @qs.run(["map_doc", {:a => "b"}])
> rows[0].should == []
> rows[1].should == [["baz","b"]]
> end
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira