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
2121import com.mongodb.ServerAddress
2222import com.mongodb.connection.AsynchronousSocketChannelStreamFactoryFactory
2323import com.mongodb.connection.netty.NettyStreamFactoryFactory
24+ import spock.lang.IgnoreIf
2425
2526import static java.util.concurrent.TimeUnit.MILLISECONDS
2627
@@ -71,18 +72,30 @@ class MongoClientsSpecification extends FunctionalSpecification {
7172 client?. close()
7273 }
7374
74- def ' should apply connection string to netty stream type ' () {
75+ def ' should apply connection string to ssl settings ' () {
7576 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 ' )
7778
7879 then :
7980 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 :
8092 client. settings. streamFactoryFactory instanceof NettyStreamFactoryFactory
8193
8294 cleanup :
8395 client?. close()
8496 }
8597
98+ @IgnoreIf ({ javaVersion < 1.7 })
8699 def ' should apply connection string to nio2 stream type' () {
87100 when :
88101 def client = MongoClients . create(' mongodb://localhost/?streamType=NIO2' )
You can’t perform that action at this time.
0 commit comments