Responded on StackOverflow as well, but just in case this is better:

Can you confirm what version of Thinking Sphinx you're using (latest is 3.0.2, 
not 3.0.10)? Also, what version of Sphinx and what operating system are you 
using?

On 27/04/2013, at 11:29 PM, Well Done Steak wrote:

> Hi All,
> 
> Hoping someone can help me on this one, I have tried a lot of things but 
> cannot get past this issue.
> 
> I am using Rails 3.2.12, RSpec-rails 2.13.0 and ThinkingSphinx 3.0.10
> 
> The problem:
> 
> When I run bundle exec rpsec spec/controllers/ads_controller_spec.rb, 
> thinking sphinx spawns 3 searchd processes which become frozen, my tests just 
> lockup until I manually killed the searchd processes after which the tests 
> continue running.
> 
> The setup:
> 
> Here is my sphinx_env.rb file which in which I setup TS for testing:
> 
> require 'thinking_sphinx/test'
> 
> 
> 
> def sphinx_environment(*tables, &block)
> 
>   obj 
> = self
> 
>   
> begin
> 
>     before
> (:all) do
> 
>       obj
> .use_transactional_fixtures = false
> 
>       
> ThinkingSphinx::Test.
> init
>       
> ThinkingSphinx::Test.
> start
>       sleep
> (0.5)
> 
>     
> end
> 
> 
>     
> yield
> 
>   
> ensure
> 
>     after
> (:all) do
> 
>       
> ThinkingSphinx::Test.
> stop
>       sleep
> (0.5)
> 
>       obj
> .use_transactional_fixtures = true
> 
>     
> end
> 
>   
> end
> end
> Here is my test script:
> 
> describe "GET index" do
> 
>   before
> (:each) do
> 
>     
> @web_origin   = FactoryGirl.create(:origin)
> 
>     
> @api_origin   = FactoryGirl.create(:api_origin)
> 
>     
> @first_ad     = FactoryGirl.create(:ad, :origin_id => @web_origin.id)
> 
> 
>     
> ThinkingSphinx::Test.index #index ads created above
> 
>     sleep 
> 0.5
> 
>   
> end
> 
> 
>   sphinx_environment 
> :ads do
>  
>     it 
> 'should return a collection of all live ads' do
> 
>       get 
> :index, {:format => 'json'}
> 
>       response
> .code.should == '200'
> 
>     
> end
>  
>   
> end
> ...
>       • When I run my tests, thinking sphinx always starts 3 searchd 
> processes.
>       • The pid in my test.sphinx.pid always has just one of the searchd 
> pid's, its always the second searchd process pid.
>       • Here is the output from my test.searchd.log file:
> 
> [ 568] binlog: finished replaying total 49 in 0.006 sec
> 
> [ 568] accepting connections
> 
> [ 568] caught SIGHUP (seamless=1, in queue=1)
> 
> [ 568] rotating index 'ad_core': started
> 
> [ 568] caught SIGHUP (seamless=1, in queue=2)
> 
> [ 568] caught SIGTERM, shutting down
> 
> Any help is appreciated.
> 
> Thanks.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  



-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to