Skip to content

Commit

Permalink
simpler way to skip/unskip these tests..
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Jan 24, 2024
1 parent 9bbcc3e commit 1554fe8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/integration/experiment_with_bulk_insert_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ class ExperimentWithBulkInsertTest < ActionDispatch::IntegrationTest
let(:scorer) { scorers(:quepid_default_scorer) }
let(:selection_strategy) { selection_strategies(:multiple_raters) }

@@skip_tests = true

test 'generate and export 5000 queries with traditional AR' do
skip('Ignoring all tests in ExperimentWithBulkInsertTest')
skip('Ignoring all tests in ExperimentWithBulkInsertTest') if @@skip_tests
book = user.books.create name: '50000 Query Doc Pairs', scorer: scorer, selection_strategy: selection_strategy
assert book.valid?
result = Benchmark.measure do
Expand All @@ -32,7 +34,7 @@ class ExperimentWithBulkInsertTest < ActionDispatch::IntegrationTest
end

test 'generate and export 5000 queries with bulk import' do
skip('Ignoring all tests in ExperimentWithBulkInsertTest')
skip('Ignoring all tests in ExperimentWithBulkInsertTest') if @@skip_tests
book = user.books.create name: '50000 Query Doc Pairs', scorer: scorer, selection_strategy: selection_strategy
assert book.valid?
result = Benchmark.measure do
Expand All @@ -56,7 +58,7 @@ class ExperimentWithBulkInsertTest < ActionDispatch::IntegrationTest
end

test 'generate and export 5000 queries with insert_all' do
skip('Ignoring all tests in ExperimentWithBulkInsertTest')
skip('Ignoring all tests in ExperimentWithBulkInsertTest') if @@skip_tests
book = user.books.create name: '50000 Query Doc Pairs', scorer: scorer, selection_strategy: selection_strategy
assert book.valid?
result = Benchmark.measure do
Expand Down Expand Up @@ -86,7 +88,7 @@ class ExperimentWithBulkInsertTest < ActionDispatch::IntegrationTest
end

test 'generate and export 5000 queries with upsert_all' do
skip('Ignoring all tests in ExperimentWithBulkInsertTest')
skip('Ignoring all tests in ExperimentWithBulkInsertTest') if @@skip_tests
book = user.books.create name: '50000 Query Doc Pairs', scorer: scorer, selection_strategy: selection_strategy
assert book.valid?
result = Benchmark.measure do
Expand Down Expand Up @@ -117,7 +119,7 @@ class ExperimentWithBulkInsertTest < ActionDispatch::IntegrationTest

# rubocop:disable Layout/LineLength
test 'generate and export 5000 queries with upsert_all when exists already data' do
skip('Ignoring all tests in ExperimentWithBulkInsertTest')
skip('Ignoring all tests in ExperimentWithBulkInsertTest') if @@skip_tests
book = user.books.create name: '50000 Query Doc Pairs', scorer: scorer, selection_strategy: selection_strategy
assert book.valid?

Expand Down

0 comments on commit 1554fe8

Please sign in to comment.