Skip to content

Commit fa6effb

Browse files
committed
Add a way to ignore some slow tests by setting the ignoreSlowUnitTests system property.
This is useful in IDEs that don't let you exclude JUnit categories from test runner configurations.
1 parent 7d19b99 commit fa6effb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

driver-core/src/test/functional/com/mongodb/connection/AsyncStreamTimeoutsSpecification.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import static com.mongodb.ClusterFixture.getPrimary
3535
import static com.mongodb.ClusterFixture.getSslSettings
3636
import static com.mongodb.connection.CommandHelper.executeCommand
3737

38+
@IgnoreIf({ System.getProperty('ignoreSlowUnitTests') == 'true' })
3839
@Category(SlowUnit)
3940
class AsyncStreamTimeoutsSpecification extends OperationFunctionalSpecification {
4041

driver-core/src/test/unit/com/mongodb/connection/InternalStreamConnectionSpecification.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ class InternalStreamConnectionSpecification extends Specification {
577577
}
578578
}
579579

580+
@IgnoreIf({ System.getProperty('ignoreSlowUnitTests') == 'true' })
580581
@Category(SlowUnit)
581582
def 'should have threadsafe connection pipelining'() {
582583
given:
@@ -613,7 +614,7 @@ class InternalStreamConnectionSpecification extends Specification {
613614
}
614615

615616
@Category([Async, SlowUnit])
616-
@IgnoreIf({ javaVersion < 1.7 })
617+
@IgnoreIf({ System.getProperty('ignoreSlowUnitTests') == 'true' || javaVersion < 1.7 })
617618
def 'should have threadsafe connection pipelining asynchronously'() {
618619
given:
619620
int threads = 10

0 commit comments

Comments
 (0)