Skip to content

Commit

Permalink
disable search by default and enable sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
akostadinov authored and mayorova committed May 23, 2024
1 parent 7f7a6e2 commit d8f3540
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions features/support/sphinx.rb
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
require 'thinking_sphinx'
require 'thinking_sphinx/test'

Before "not @search" do
::ThinkingSphinx::Test.disable_search_jobs!
end

Before('@search') do
Sidekiq::Job.clear_all
::ThinkingSphinx::Test.stop
::ThinkingSphinx::Test.clear
::ThinkingSphinx::Test.init
$searchd_autostop_installed ||= ::ThinkingSphinx::Test.autostop
::ThinkingSphinx::Test.wait_start

::ThinkingSphinx::Test.enable_search_jobs!
end

After '@search' do
::ThinkingSphinx::Test.disable_search_jobs!
::ThinkingSphinx::Test.stop
end

After "not @search" do
::ThinkingSphinx::Test.enable_search_jobs!
end
::ThinkingSphinx::Test.disable_search_jobs!

0 comments on commit d8f3540

Please sign in to comment.