Skip to content

Commit f54b445

Browse files
committed
Test: Limit Java version for UnixServerAddress tests
JAVA-163
1 parent e1680a2 commit f54b445

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

driver-core/src/test/unit/com/mongodb/UnixServerAddressSpecification.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616

1717
package com.mongodb
1818

19+
import spock.lang.IgnoreIf
1920
import spock.lang.Specification
2021

22+
@IgnoreIf({ javaVersion < 1.7 })
2123
class UnixServerAddressSpecification extends Specification {
2224

2325
def 'should return the path for the host'() {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import com.mongodb.event.ClusterListener
2323
import com.mongodb.selector.CompositeServerSelector
2424
import com.mongodb.selector.LatencyMinimizingServerSelector
2525
import com.mongodb.selector.WritableServerSelector
26+
import spock.lang.IgnoreIf
2627
import spock.lang.Specification
2728

2829
import java.util.concurrent.TimeUnit
@@ -367,6 +368,7 @@ class ClusterSettingsSpecification extends Specification {
367368
.build().hashCode() != ClusterSettings.builder().hosts(hosts).build().hashCode()
368369
}
369370

371+
@IgnoreIf({ javaVersion < 1.7 })
370372
def 'should replace unknown ServerAddress subclass instances with ServerAddress'() {
371373
when:
372374
def settings = ClusterSettings.builder().hosts([new ServerAddress('server1'),

0 commit comments

Comments
 (0)