summaryrefslogtreecommitdiff
path: root/vendor/plugins/thinking-sphinx/features/delayed_delta_indexing.feature
blob: 5be4c4ea621d781fb6e5b38fd40ae533b0a33ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Feature: Delayed Delta Indexing
  In order to have delta indexing on frequently-updated sites
  Developers
  Should be able to use delayed_job to handle delta indexes to lower system load
  
  Scenario: Delta Index should not fire automatically
    Given Sphinx is running
    And I am searching on delayed betas
    When I search for one
    Then I should get 1 result
  
    When I change the name of delayed beta one to eleven
    And I wait for Sphinx to catch up
    And I search for one
    Then I should get 1 result
    
    When I search for eleven
    Then I should get 0 results
  
  Scenario: Delta Index should fire when jobs are run
    Given Sphinx is running
    And I am searching on delayed betas
    When I search for one
    Then I should get 1 result
  
    When I change the name of delayed beta two to twelve
    And I wait for Sphinx to catch up
    And I search for twelve
    Then I should get 0 results
    
    When I run the delayed jobs
    And I wait for Sphinx to catch up
    And I search for twelve
    Then I should get 1 result
    
    When I search for two
    Then I should get 0 results