Skip to content

Commit

Permalink
Merge pull request #3803 from akostadinov/master
Browse files Browse the repository at this point in the history
disable search by default in cucumbers and enable with @search annotation
  • Loading branch information
akostadinov authored May 27, 2024
2 parents 381743b + 8988cad commit 5b43959
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions features/support/sphinx.rb
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
require 'thinking_sphinx'
require 'thinking_sphinx/test'

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

Before('@search') do
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

0 comments on commit 5b43959

Please sign in to comment.