@@ -47,8 +47,8 @@ type testContainer struct {
4747 Tests []testCase
4848}
4949
50- const connstringTestsDir = "../../../../testdata/source/connection-string/"
51- const urioptionsTestDir = "../../../../testdata/source/uri-options/"
50+ const connstringTestsDir = "../../../../testdata/source/connection-string/tests/ "
51+ const urioptionsTestDir = "../../../../testdata/source/uri-options/tests/ "
5252
5353func (h * host ) toString () string {
5454 switch h .Type {
@@ -108,8 +108,26 @@ var skipKeywords = []string{
108108 "tlsDisableCertificateRevocationCheck" ,
109109 "serverSelectionTryOnce" ,
110110
111- // GODRIVER-2348: the wtimeoutMS write concern option is not supported.
111+ // These tests violate current Go Driver behavior
112+ "Empty integer option values are ignored" , // PEC-1545
113+ "Empty boolean option value are ignored" , // SPEC-1545
114+ "Comma in a key value pair causes a warning" , // DRIVERS-2915
115+
116+ // Unclear ~ possible bugs
117+ "maxConnecting=0 causes a warning" , // DRIVERS-1943
118+
119+ // TODO(GODRIVER-2348): the wtimeoutMS write concern option is not supported.
112120 "wTimeoutMS" ,
121+
122+ // TODO(GODRIVER-2991): make delimiting slash between hosts and options
123+ // optional.
124+ "Missing delimiting slash between hosts and options" ,
125+
126+ // TODO(GODRIVER-2183): Socks5 Proxy Support
127+ "proxyPort" ,
128+ "proxyHost" ,
129+ "proxyPassword" ,
130+ "proxyUsername" ,
113131}
114132
115133func runTest (t * testing.T , test testCase , warningsError bool ) {
@@ -163,7 +181,7 @@ func runTest(t *testing.T, test testCase, warningsError bool) {
163181 // for options that are present.
164182 var ok bool
165183
166- _ , ok = test .Options ["maxpoolsize " ]
184+ _ , ok = test .Options ["maxPoolSize " ]
167185 require .Equal (t , ok , cs .MaxPoolSizeSet )
168186}
169187
@@ -220,13 +238,13 @@ func verifyConnStringOptions(t *testing.T, cs *connstring.ConnString, options ma
220238 require .Equal (t , value , float64 (cs .MaxConnIdleTime / time .Millisecond ))
221239 case "maxpoolsize" :
222240 require .True (t , cs .MaxPoolSizeSet )
223- require .Equal (t , value , cs .MaxPoolSize )
241+ require .Equal (t , value , float64 ( cs .MaxPoolSize ) )
224242 case "maxstalenessseconds" :
225243 require .True (t , cs .MaxStalenessSet )
226244 require .Equal (t , value , float64 (cs .MaxStaleness / time .Second ))
227245 case "minpoolsize" :
228246 require .True (t , cs .MinPoolSizeSet )
229- require .Equal (t , value , int64 (cs .MinPoolSize ))
247+ require .Equal (t , value , float64 (cs .MinPoolSize ))
230248 case "readpreference" :
231249 require .Equal (t , value , cs .ReadPreference )
232250 case "readpreferencetags" :
@@ -285,7 +303,12 @@ func verifyConnStringOptions(t *testing.T, cs *connstring.ConnString, options ma
285303 require .Equal (t , value , cs .SSLDisableOCSPEndpointCheck )
286304 case "servermonitoringmode" :
287305 require .Equal (t , value , cs .ServerMonitoringMode )
306+ case "timeoutms" :
307+ require .Equal (t , value , float64 (cs .Timeout / time .Millisecond ))
308+ case "maxconnecting" :
309+ require .Equal (t , value , float64 (cs .MaxConnecting ))
288310 default :
311+ fmt .Println (key )
289312 opt , ok := cs .UnknownOptions [key ]
290313 require .True (t , ok )
291314 require .Contains (t , opt , fmt .Sprint (value ))
0 commit comments