You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ruby-dev@lucene.apache.org by Erik Hatcher <er...@ehatchersolutions.com> on 2007/02/12 15:11:59 UTC

solrb testing?

for those solrbians out there, are all well with these:

	rake # runs just the unit tests

	rake test # runs unit and functional tests

	rake test:coverage # requires rcov gem, shows test coverage


i've heard one person (Ed) report some issues, but that's all (other  
than those 3 Windows users out there who have issues with the  
functional tests!).

	erik


Re: solrb testing?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Since I can't tackle this at the moment, I've queued it up in JIRA:

	<https://issues.apache.org/jira/browse/SOLR-163>

I've not seen any local test failures like this myself, so this is an  
odd one.

	Erik


On Feb 13, 2007, at 1:11 PM, Edward Summers wrote:

>
> On Feb 13, 2007, at 2:13 AM, Coda Hale wrote:
>
>> On 2/12/07, Edward Summers <eh...@pobox.com> wrote:
>>> Mysteriously, I get two failures for the unit tests. I haven't had
>>> time to dig in and see why it's only affecting me.
>>> <"<delete>\n  <query>&#xEB;&#xE4;&#xEF;&#xF6;&#xFC;</query>\n</
>>> delete>"> expected to be =~
>>> </<delete>[\s]*<query>\303\253\303\244\303\257\303\266\303\274<\/
>>> query>[\s]*<\/delete>/m>.
>>
>> Hmm. This looks like a problem with the test. Let me guess -- you
>> don't have libxml-ruby installed?
>>
>> Looks like REXML encodes the characters as entities rather than leave
>> them as characters.
>>
>> Anyone got a good idea of how to normalize the tests here?
>
> Strangely I do have libxml-ruby-0.3.8.4 installed:
>
> frizz:~/Projects/solr/client/ruby/solrb edsu$ xml2-config --version
> 2.6.23
> frizz:~/Projects/solr/client/ruby/solrb edsu$ irb
> irb(main):001:0> require 'xml/libxml'
> irb(main):002:0>
>
> //Ed


Re: solrb testing?

Posted by Edward Summers <eh...@pobox.com>.
On Feb 13, 2007, at 2:13 AM, Coda Hale wrote:

> On 2/12/07, Edward Summers <eh...@pobox.com> wrote:
>> Mysteriously, I get two failures for the unit tests. I haven't had
>> time to dig in and see why it's only affecting me.
>> <"<delete>\n  <query>&#xEB;&#xE4;&#xEF;&#xF6;&#xFC;</query>\n</
>> delete>"> expected to be =~
>> </<delete>[\s]*<query>\303\253\303\244\303\257\303\266\303\274<\/
>> query>[\s]*<\/delete>/m>.
>
> Hmm. This looks like a problem with the test. Let me guess -- you
> don't have libxml-ruby installed?
>
> Looks like REXML encodes the characters as entities rather than leave
> them as characters.
>
> Anyone got a good idea of how to normalize the tests here?

Strangely I do have libxml-ruby-0.3.8.4 installed:

frizz:~/Projects/solr/client/ruby/solrb edsu$ xml2-config --version
2.6.23
frizz:~/Projects/solr/client/ruby/solrb edsu$ irb
irb(main):001:0> require 'xml/libxml'
irb(main):002:0>

//Ed

Re: solrb testing?

Posted by Coda Hale <co...@gmail.com>.
On 2/12/07, Edward Summers <eh...@pobox.com> wrote:
> Mysteriously, I get two failures for the unit tests. I haven't had
> time to dig in and see why it's only affecting me.
> <"<delete>\n  <query>&#xEB;&#xE4;&#xEF;&#xF6;&#xFC;</query>\n</
> delete>"> expected to be =~
> </<delete>[\s]*<query>\303\253\303\244\303\257\303\266\303\274<\/
> query>[\s]*<\/delete>/m>.

Hmm. This looks like a problem with the test. Let me guess -- you
don't have libxml-ruby installed?

Looks like REXML encodes the characters as entities rather than leave
them as characters.

Anyone got a good idea of how to normalize the tests here?

-- 
Coda Hale
http://blog.codahale.com

Re: solrb testing?

Posted by Edward Summers <eh...@pobox.com>.
On Feb 12, 2007, at 9:11 AM, Erik Hatcher wrote:
> i've heard one person (Ed) report some issues, but that's all  
> (other than those 3 Windows users out there who have issues with  
> the functional tests!).

Mysteriously, I get two failures for the unit tests. I haven't had  
time to dig in and see why it's only affecting me.

frizz:~/Projects/solr/client/ruby/solrb edsu$ ruby -v
ruby 1.8.4 (2005-12-24) [i686-darwin8.6.1]

frizz:~/Projects/solr/client/ruby/solrb edsu$ rake
(in /Users/edsu/Projects/solr/client/ruby/solrb)
/usr/local/bin/ruby -Ilib -r solr -r test/unit -Itest/unit "/usr/ 
local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb"  
"test/unit/add_document_test.rb" "test/unit/commit_test.rb" "test/ 
unit/connection_test.rb" "test/unit/delete_test.rb" "test/unit/ 
dismax_request_test.rb" "test/unit/document_test.rb" "test/unit/ 
field_test.rb" "test/unit/ping_test.rb" "test/unit/request_test.rb"  
"test/unit/response_test.rb" "test/unit/standard_request_test.rb"  
"test/unit/standard_response_test.rb"
Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/ 
rake_test_loader
Started
................F...........F..........................
Finished in 0.032127 seconds.

   1) Failure:
test_delete_by_i18n_query_request(DeleteTest) [./test/unit/ 
delete_test.rb:53]:
<"<delete>\n  <query>&#xEB;&#xE4;&#xEF;&#xF6;&#xFC;</query>\n</ 
delete>"> expected to be =~
</<delete>[\s]*<query>\303\253\303\244\303\257\303\266\303\274<\/ 
query>[\s]*<\/delete>/m>.

   2) Failure:
test_i18n_xml(FieldTest) [./test/unit/field_test.rb:39]:
<"<field name=\"i18nstring\">&#xC4;&#xEA;&#xE2;&#xEE;&#xF4;&#xFB;  
&#xD6;&#xEB;&#xE4;&#xEF;&#xF6;&#xFC;</field>"> expected to be =~
</<field name=["']i18nstring["']>\303\204\303\252\303\242\303\256\303 
\264\303\273 \303\226\303\253\303\244\303\257\303\266\303\274<\/ 
field>/m>.

55 tests, 122 assertions, 2 failures, 0 errors
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -Ilib -r solr -r  
test/...]

>
> 	erik
>