Permalink
Browse files

Clean up/fix the Solr stop/start.

  • Loading branch information...
1 parent f613525 commit 469d76efa1cf7bc250bdf01f74097c0be77b4b5b @cpence cpence committed May 6, 2012
Showing with 2 additions and 13 deletions.
  1. +1 −1 .travis.yml
  2. +1 −12 spec/support/solr_server.rb
View
@@ -8,7 +8,7 @@ before_script:
- "cp config/database.yml.travis config/database.yml"
- "cp config/app_config.yml.travis config/app_config.yml"
- "mkdir downloads"
- - "script/solr_start"
+ - "script/solr_start ."
script:
- "bundle exec rake db:drop db:create db:schema:load spec --trace"
@@ -1,19 +1,8 @@
# -*- encoding : utf-8 -*-
-require 'pty'
-
-# Start and stop a bundled Solr server
+# Break the Solr server by stubbing it out using WebMock, to simulate errors.
module SolrServer
- def self.start
- `#{Rails.root.join('script', 'solr_start')} "#{Rails.root.to_s}"`
- sleep 3
- end
-
- def self.stop
- `#{Rails.root.join('script', 'solr_stop')} "#{Rails.root.to_s}"`
- end
-
def self.disable
WebMock.disable_net_connect!
WebMock.stub_request(:any, /http:\/\/localhost:8983.*/).to_return(:body => "{}", :status => 200, :headers => { 'Content-Length' => 2 })

0 comments on commit 469d76e

Please sign in to comment.