Skip to content

Commit 22f52c4

Browse files
committed
Set an env variable ALL_RS_TESTS if all replica set tests should run
1 parent 5304701 commit 22f52c4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tasks/testing.rake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# Note: To run all replica set tests, set the env variable, ALL_RS_TESTS to true.
16+
1517
TEST_SUITES = {
1618
:bson => { :pattern => 'test/bson/*_test.rb' },
1719
:unit => { :pattern => 'test/unit/**/*_test.rb' },
@@ -24,7 +26,9 @@ TEST_SUITES = {
2426
:threading => { :pattern => 'test/threading/**/*_test.rb' },
2527
:replica_set => {
2628
:pattern => 'test/replica_set/**/*_test.rb',
27-
:exclude => ['test/replica_set/ssl_test.rb']
29+
:exclude => ['test/replica_set/count_test.rb',
30+
'test/replica_set/read_preference_test.rb',
31+
'test/replica_set/ssl_test.rb']
2832
},
2933
:sharded_cluster => { :pattern => 'test/sharded_cluster/**/*_test.rb' },
3034
:tools => {
@@ -33,6 +37,11 @@ TEST_SUITES = {
3337
}
3438
}
3539

40+
if ENV['ALL_RS_TESTS']
41+
TEST_SUITES[:replica_set][:exclude].delete('test/replica_set/count_test.rb')
42+
TEST_SUITES[:replica_set][:exclude].delete('test/replica_set/read_preference_test.rb')
43+
end
44+
3645
if RUBY_VERSION > '1.9'
3746
require 'coveralls/rake/task'
3847
Coveralls::RakeTask.new

0 commit comments

Comments
 (0)