File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
driver-async/src/test/functional/com/mongodb/async/client Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import com.mongodb.MongoCredential
21
21
import com.mongodb.ServerAddress
22
22
import com.mongodb.connection.AsynchronousSocketChannelStreamFactoryFactory
23
23
import com.mongodb.connection.netty.NettyStreamFactoryFactory
24
+ import spock.lang.IgnoreIf
24
25
25
26
import static java.util.concurrent.TimeUnit.MILLISECONDS
26
27
@@ -71,18 +72,30 @@ class MongoClientsSpecification extends FunctionalSpecification {
71
72
client?. close()
72
73
}
73
74
74
- def ' should apply connection string to netty stream type ' () {
75
+ def ' should apply connection string to ssl settings ' () {
75
76
when :
76
- def client = MongoClients . create(' mongodb://localhost/?ssl=true&streamType=Netty ' )
77
+ def client = MongoClients . create(' mongodb://localhost/?ssl=true&sslInvalidHostNameAllowed=true& streamType=netty ' )
77
78
78
79
then :
79
80
client. settings. sslSettings. enabled
81
+ client. settings. sslSettings. invalidHostNameAllowed
82
+
83
+ cleanup :
84
+ client?. close()
85
+ }
86
+
87
+ def ' should apply connection string to netty stream type' () {
88
+ when :
89
+ def client = MongoClients . create(' mongodb://localhost/?streamType=Netty' )
90
+
91
+ then :
80
92
client. settings. streamFactoryFactory instanceof NettyStreamFactoryFactory
81
93
82
94
cleanup :
83
95
client?. close()
84
96
}
85
97
98
+ @IgnoreIf ({ javaVersion < 1.7 })
86
99
def ' should apply connection string to nio2 stream type' () {
87
100
when :
88
101
def client = MongoClients . create(' mongodb://localhost/?streamType=NIO2' )
You can’t perform that action at this time.
0 commit comments