You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2007/02/17 04:13:58 UTC

svn commit: r508703 - /lucene/solr/trunk/client/ruby/solrb/test/functional/server_test.rb

Author: ehatcher
Date: Fri Feb 16 19:13:58 2007
New Revision: 508703

URL: http://svn.apache.org/viewvc?view=rev&rev=508703
Log:
Loosen up test_bad_connection to hopefully also work on Windows

Modified:
    lucene/solr/trunk/client/ruby/solrb/test/functional/server_test.rb

Modified: lucene/solr/trunk/client/ruby/solrb/test/functional/server_test.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solrb/test/functional/server_test.rb?view=diff&rev=508703&r1=508702&r2=508703
==============================================================================
--- lucene/solr/trunk/client/ruby/solrb/test/functional/server_test.rb (original)
+++ lucene/solr/trunk/client/ruby/solrb/test/functional/server_test.rb Fri Feb 16 19:13:58 2007
@@ -95,8 +95,12 @@
 
   def test_bad_connection
     conn = Solr::Connection.new 'http://127.0.0.1:9999/invalid'
-    assert_raise(Errno::ECONNREFUSED) do
+    begin
       conn.send(Solr::Request::Ping.new)
+      flunk "Expected exception not raised"
+    rescue ::Exception
+      # expected
+      assert true
     end
   end
   



Fwd: svn commit: r508703 - /lucene/solr/trunk/client/ruby/solrb/test/functional/server_test.rb

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
by the way, I had trouble getting assert_raise(::Exception) do ...  
end working here, so i did it the old fashioned way.  weird.

Begin forwarded message:

> From: ehatcher@apache.org
> Date: February 16, 2007 10:13:58 PM EST
> To: solr-commits@lucene.apache.org
> Subject: svn commit: r508703 - /lucene/solr/trunk/client/ruby/solrb/ 
> test/functional/server_test.rb
> Reply-To: solr-dev@lucene.apache.org
>
> Author: ehatcher
> Date: Fri Feb 16 19:13:58 2007
> New Revision: 508703
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=508703
> Log:
> Loosen up test_bad_connection to hopefully also work on Windows
>
> Modified:
>     lucene/solr/trunk/client/ruby/solrb/test/functional/server_test.rb
>
> Modified: lucene/solr/trunk/client/ruby/solrb/test/functional/ 
> server_test.rb
> URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/ 
> solrb/test/functional/server_test.rb? 
> view=diff&rev=508703&r1=508702&r2=508703
> ====================================================================== 
> ========
> --- lucene/solr/trunk/client/ruby/solrb/test/functional/ 
> server_test.rb (original)
> +++ lucene/solr/trunk/client/ruby/solrb/test/functional/ 
> server_test.rb Fri Feb 16 19:13:58 2007
> @@ -95,8 +95,12 @@
>
>    def test_bad_connection
>      conn = Solr::Connection.new 'http://127.0.0.1:9999/invalid'
> -    assert_raise(Errno::ECONNREFUSED) do
> +    begin
>        conn.send(Solr::Request::Ping.new)
> +      flunk "Expected exception not raised"
> +    rescue ::Exception
> +      # expected
> +      assert true
>      end
>    end
>
>