diff --git a/test/srv_seedlist/load-balanced/loadBalanced-directConnection.json b/test/srv_seedlist/load-balanced/loadBalanced-directConnection.json index 3f500acdc..8e459115c 100644 --- a/test/srv_seedlist/load-balanced/loadBalanced-directConnection.json +++ b/test/srv_seedlist/load-balanced/loadBalanced-directConnection.json @@ -10,5 +10,6 @@ "loadBalanced": true, "ssl": true, "directConnection": false - } + }, + "ping": true } diff --git a/test/srv_seedlist/load-balanced/loadBalanced-true-txt.json b/test/srv_seedlist/load-balanced/loadBalanced-true-txt.json index f9719e760..39bff5a23 100644 --- a/test/srv_seedlist/load-balanced/loadBalanced-true-txt.json +++ b/test/srv_seedlist/load-balanced/loadBalanced-true-txt.json @@ -9,5 +9,6 @@ "options": { "loadBalanced": true, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/load-balanced/srvMaxHosts-zero-txt.json b/test/srv_seedlist/load-balanced/srvMaxHosts-zero-txt.json index a18360ea6..474a314fd 100644 --- a/test/srv_seedlist/load-balanced/srvMaxHosts-zero-txt.json +++ b/test/srv_seedlist/load-balanced/srvMaxHosts-zero-txt.json @@ -10,5 +10,6 @@ "loadBalanced": true, "srvMaxHosts": 0, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/load-balanced/srvMaxHosts-zero.json b/test/srv_seedlist/load-balanced/srvMaxHosts-zero.json index bd8541811..dfc90dc96 100644 --- a/test/srv_seedlist/load-balanced/srvMaxHosts-zero.json +++ b/test/srv_seedlist/load-balanced/srvMaxHosts-zero.json @@ -10,5 +10,6 @@ "loadBalanced": true, "srvMaxHosts": 0, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/direct-connection-false.json b/test/srv_seedlist/replica-set/direct-connection-false.json index 1d57bdcb3..3f14ff94e 100644 --- a/test/srv_seedlist/replica-set/direct-connection-false.json +++ b/test/srv_seedlist/replica-set/direct-connection-false.json @@ -11,5 +11,6 @@ "options": { "ssl": true, "directConnection": false - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/encoded-userinfo-and-db.json b/test/srv_seedlist/replica-set/encoded-userinfo-and-db.json index 70c6c23a3..4493628be 100644 --- a/test/srv_seedlist/replica-set/encoded-userinfo-and-db.json +++ b/test/srv_seedlist/replica-set/encoded-userinfo-and-db.json @@ -17,5 +17,6 @@ "password": "$4to@L8=MC", "db": "mydb?" }, + "ping": false, "comment": "Encoded user, pass, and DB parse correctly" } diff --git a/test/srv_seedlist/replica-set/loadBalanced-false-txt.json b/test/srv_seedlist/replica-set/loadBalanced-false-txt.json index fd2e565c7..682d32a74 100644 --- a/test/srv_seedlist/replica-set/loadBalanced-false-txt.json +++ b/test/srv_seedlist/replica-set/loadBalanced-false-txt.json @@ -11,5 +11,6 @@ "options": { "loadBalanced": false, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/longer-parent-in-return.json b/test/srv_seedlist/replica-set/longer-parent-in-return.json index 9a8267eae..ebe3fe1e7 100644 --- a/test/srv_seedlist/replica-set/longer-parent-in-return.json +++ b/test/srv_seedlist/replica-set/longer-parent-in-return.json @@ -12,5 +12,6 @@ "replicaSet": "repl0", "ssl": true }, + "ping": true, "comment": "Is correct, as returned host name shared the URI root \"test.build.10gen.cc\"." } diff --git a/test/srv_seedlist/replica-set/one-result-default-port.json b/test/srv_seedlist/replica-set/one-result-default-port.json index cebb3b1ec..9f7733de8 100644 --- a/test/srv_seedlist/replica-set/one-result-default-port.json +++ b/test/srv_seedlist/replica-set/one-result-default-port.json @@ -11,5 +11,6 @@ "options": { "replicaSet": "repl0", "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/one-txt-record-multiple-strings.json b/test/srv_seedlist/replica-set/one-txt-record-multiple-strings.json index 622668c35..1d740b1b5 100644 --- a/test/srv_seedlist/replica-set/one-txt-record-multiple-strings.json +++ b/test/srv_seedlist/replica-set/one-txt-record-multiple-strings.json @@ -11,5 +11,6 @@ "options": { "replicaSet": "repl0", "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/one-txt-record.json b/test/srv_seedlist/replica-set/one-txt-record.json index 2385021ad..ecdb0a7e2 100644 --- a/test/srv_seedlist/replica-set/one-txt-record.json +++ b/test/srv_seedlist/replica-set/one-txt-record.json @@ -12,5 +12,6 @@ "replicaSet": "repl0", "authSource": "thisDB", "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/srv-service-name.json b/test/srv_seedlist/replica-set/srv-service-name.json index ec36cdbb0..e320c2ca3 100644 --- a/test/srv_seedlist/replica-set/srv-service-name.json +++ b/test/srv_seedlist/replica-set/srv-service-name.json @@ -12,5 +12,6 @@ "options": { "ssl": true, "srvServiceName": "customname" - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/srvMaxHosts-equal_to_srv_records.json b/test/srv_seedlist/replica-set/srvMaxHosts-equal_to_srv_records.json index d9765ac66..70edacfd0 100644 --- a/test/srv_seedlist/replica-set/srvMaxHosts-equal_to_srv_records.json +++ b/test/srv_seedlist/replica-set/srvMaxHosts-equal_to_srv_records.json @@ -13,5 +13,6 @@ "options": { "srvMaxHosts": 2, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/srvMaxHosts-greater_than_srv_records.json b/test/srv_seedlist/replica-set/srvMaxHosts-greater_than_srv_records.json index 494bb8768..72540ed40 100644 --- a/test/srv_seedlist/replica-set/srvMaxHosts-greater_than_srv_records.json +++ b/test/srv_seedlist/replica-set/srvMaxHosts-greater_than_srv_records.json @@ -12,5 +12,6 @@ "options": { "srvMaxHosts": 3, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/srvMaxHosts-less_than_srv_records.json b/test/srv_seedlist/replica-set/srvMaxHosts-less_than_srv_records.json index 66a5e90da..a9d6dd6fd 100644 --- a/test/srv_seedlist/replica-set/srvMaxHosts-less_than_srv_records.json +++ b/test/srv_seedlist/replica-set/srvMaxHosts-less_than_srv_records.json @@ -9,5 +9,6 @@ "options": { "srvMaxHosts": 1, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/srvMaxHosts-zero-txt.json b/test/srv_seedlist/replica-set/srvMaxHosts-zero-txt.json index 241a901c6..e232edb9e 100644 --- a/test/srv_seedlist/replica-set/srvMaxHosts-zero-txt.json +++ b/test/srv_seedlist/replica-set/srvMaxHosts-zero-txt.json @@ -13,5 +13,6 @@ "replicaSet": "repl0", "srvMaxHosts": 0, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/srvMaxHosts-zero.json b/test/srv_seedlist/replica-set/srvMaxHosts-zero.json index c68610a20..3421a35a3 100644 --- a/test/srv_seedlist/replica-set/srvMaxHosts-zero.json +++ b/test/srv_seedlist/replica-set/srvMaxHosts-zero.json @@ -13,5 +13,6 @@ "replicaSet": "repl0", "srvMaxHosts": 0, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/two-results-default-port.json b/test/srv_seedlist/replica-set/two-results-default-port.json index 66028310a..43efcc631 100644 --- a/test/srv_seedlist/replica-set/two-results-default-port.json +++ b/test/srv_seedlist/replica-set/two-results-default-port.json @@ -12,5 +12,6 @@ "options": { "replicaSet": "repl0", "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/two-results-nonstandard-port.json b/test/srv_seedlist/replica-set/two-results-nonstandard-port.json index 4900f7cff..f6e8e415a 100644 --- a/test/srv_seedlist/replica-set/two-results-nonstandard-port.json +++ b/test/srv_seedlist/replica-set/two-results-nonstandard-port.json @@ -12,5 +12,6 @@ "options": { "replicaSet": "repl0", "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/txt-record-with-overridden-ssl-option.json b/test/srv_seedlist/replica-set/txt-record-with-overridden-ssl-option.json index 0ebc737bd..3d84cfe44 100644 --- a/test/srv_seedlist/replica-set/txt-record-with-overridden-ssl-option.json +++ b/test/srv_seedlist/replica-set/txt-record-with-overridden-ssl-option.json @@ -12,5 +12,6 @@ "replicaSet": "repl0", "authSource": "thisDB", "ssl": false - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/txt-record-with-overridden-uri-option.json b/test/srv_seedlist/replica-set/txt-record-with-overridden-uri-option.json index 2626ba608..1a5a24068 100644 --- a/test/srv_seedlist/replica-set/txt-record-with-overridden-uri-option.json +++ b/test/srv_seedlist/replica-set/txt-record-with-overridden-uri-option.json @@ -12,5 +12,6 @@ "replicaSet": "repl0", "authSource": "otherDB", "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/uri-with-admin-database.json b/test/srv_seedlist/replica-set/uri-with-admin-database.json index 32710d75f..c5513a0da 100644 --- a/test/srv_seedlist/replica-set/uri-with-admin-database.json +++ b/test/srv_seedlist/replica-set/uri-with-admin-database.json @@ -15,5 +15,6 @@ }, "parsed_options": { "auth_database": "adminDB" - } + }, + "ping": true } diff --git a/test/srv_seedlist/replica-set/uri-with-auth.json b/test/srv_seedlist/replica-set/uri-with-auth.json index cc7257d85..872f997cc 100644 --- a/test/srv_seedlist/replica-set/uri-with-auth.json +++ b/test/srv_seedlist/replica-set/uri-with-auth.json @@ -9,9 +9,14 @@ "localhost:27018", "localhost:27019" ], + "options": { + "replicaSet": "repl0", + "ssl": true + }, "parsed_options": { "user": "auser", "password": "apass" }, + "ping": false, "comment": "Should preserve auth credentials" } diff --git a/test/srv_seedlist/sharded/srvMaxHosts-equal_to_srv_records.json b/test/srv_seedlist/sharded/srvMaxHosts-equal_to_srv_records.json index 46390726f..7d2f9a6bf 100644 --- a/test/srv_seedlist/sharded/srvMaxHosts-equal_to_srv_records.json +++ b/test/srv_seedlist/sharded/srvMaxHosts-equal_to_srv_records.json @@ -12,5 +12,6 @@ "options": { "srvMaxHosts": 2, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/sharded/srvMaxHosts-greater_than_srv_records.json b/test/srv_seedlist/sharded/srvMaxHosts-greater_than_srv_records.json index e02d72bf2..452c7b54d 100644 --- a/test/srv_seedlist/sharded/srvMaxHosts-greater_than_srv_records.json +++ b/test/srv_seedlist/sharded/srvMaxHosts-greater_than_srv_records.json @@ -11,5 +11,6 @@ "options": { "srvMaxHosts": 3, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/sharded/srvMaxHosts-less_than_srv_records.json b/test/srv_seedlist/sharded/srvMaxHosts-less_than_srv_records.json index fdcc1692c..cd3bf6511 100644 --- a/test/srv_seedlist/sharded/srvMaxHosts-less_than_srv_records.json +++ b/test/srv_seedlist/sharded/srvMaxHosts-less_than_srv_records.json @@ -5,5 +5,6 @@ "options": { "srvMaxHosts": 1, "ssl": true - } + }, + "ping": true } diff --git a/test/srv_seedlist/sharded/srvMaxHosts-zero.json b/test/srv_seedlist/sharded/srvMaxHosts-zero.json index 10ab9e656..f289628c9 100644 --- a/test/srv_seedlist/sharded/srvMaxHosts-zero.json +++ b/test/srv_seedlist/sharded/srvMaxHosts-zero.json @@ -11,5 +11,6 @@ "options": { "srvMaxHosts": 0, "ssl": true - } + }, + "ping": true } diff --git a/test/test_dns.py b/test/test_dns.py index 0fe57a4fe..7b74eb3f7 100644 --- a/test/test_dns.py +++ b/test/test_dns.py @@ -132,6 +132,8 @@ def create_test(test_case): wait_until( lambda: num_hosts == len(client.nodes), "wait to connect to num_hosts" ) + if test_case.get("ping", True): + client.admin.command("ping") # XXX: we should block until SRV poller runs at least once # and re-run these assertions. else: