Skip to content

Commit e0de429

Browse files
committed
GODRIVER-3098 Sync SDAM spec tests at 348d2f39.
1 parent b177a7b commit e0de429

File tree

215 files changed

+1844
-640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+1844
-640
lines changed

internal/integration/unified_spec_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ var directories = []string{
164164
"convenient-transactions",
165165
"retryable-reads/legacy",
166166
"read-write-concern/operation",
167-
"server-discovery-and-monitoring/integration",
168167
"atlas-data-lake-testing",
169168
}
170169

internal/spectest/skip.go

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,23 @@ import "testing"
1111
// skipTests is a map of "fully-qualified test name" to "the reason for skipping
1212
// the test".
1313
var skipTests = map[string]string{
14-
"TestURIOptionsSpec/single-threaded-options.json/Valid_options_specific_to_single-threaded_drivers_are_parsed_correctly": "the Go Driver is not single-threaded.",
14+
"TestURIOptionsSpec/single-threaded-options.json/Valid_options_specific_to_single-threaded_drivers_are_parsed_correctly": "The Go Driver is not single-threaded.",
15+
1516
// GODRIVER-2348: The wtimeoutMS write concern option is not supported.
16-
"TestURIOptionsSpec/concern-options.json/Valid_read_and_write_concern_are_parsed_correctly": "the wtimeoutMS write concern option is not supported",
17+
"TestURIOptionsSpec/concern-options.json/Valid_read_and_write_concern_are_parsed_correctly": "The wtimeoutMS write concern option is not supported",
1718

1819
// SPEC-1403: This test checks to see if the correct error is thrown when
1920
// auto encrypting with a server < 4.2. Currently, the test will fail
2021
// because a server < 4.2 wouldn't have mongocryptd, so Client construction
2122
// would fail with a mongocryptd spawn error.
22-
"TestClientSideEncryptionSpec/maxWireVersion.json/operation_fails_with_maxWireVersion_<_8": "servers less than 4.2 do not have mongocryptd; see SPEC-1403",
23+
"TestClientSideEncryptionSpec/maxWireVersion.json/operation_fails_with_maxWireVersion_<_8": "Servers less than 4.2 do not have mongocryptd; see SPEC-1403",
2324

2425
// GODRIVER-1827: These 2 tests assert that in-use connections are not
2526
// closed until checked back into a closed pool, but the Go connection pool
2627
// aggressively closes in-use connections. That behavior is currently
2728
// required by the "Client.Disconnect" API, so skip the tests.
28-
"TestCMAPSpec/pool-close-destroy-conns.json/When_a_pool_is_closed,_it_MUST_first_destroy_all_available_connections_in_that_pool": "test requires that close does not aggressively close used connections",
29-
"TestCMAPSpec/pool-close-destroy-conns.json/must_destroy_checked_in_connection_if_pool_has_been_closed": "test requires that close does not aggressively close used connections",
29+
"TestCMAPSpec/pool-close-destroy-conns.json/When_a_pool_is_closed,_it_MUST_first_destroy_all_available_connections_in_that_pool": "Test requires that close does not aggressively close used connections",
30+
"TestCMAPSpec/pool-close-destroy-conns.json/must_destroy_checked_in_connection_if_pool_has_been_closed": "Test requires that close does not aggressively close used connections",
3031

3132
// GODRIVER-1826: The load-balancer SDAM error handling test "errors during
3233
// authentication are processed" currently asserts that handshake errors
@@ -40,7 +41,7 @@ var skipTests = map[string]string{
4041
// TODO(DRIVERS-1785): Re-enable this test once the spec test is updated to
4142
// use the same event order as the "errors during authentication are
4243
// processed" load-balancer SDAM spec test.
43-
"TestCMAPSpec/pool-create-min-size-error.json/error_during_minPoolSize_population_clears_pool": "event ordering is incompatible with load-balancer SDAM spec test (DRIVERS-1785)",
44+
"TestCMAPSpec/pool-create-min-size-error.json/error_during_minPoolSize_population_clears_pool": "Event ordering is incompatible with load-balancer SDAM spec test (DRIVERS-1785)",
4445

4546
// GODRIVER-1826: The Go connection pool does not currently always deliver
4647
// connections created by maintain() to waiting check-outs. There is a race
@@ -53,7 +54,7 @@ var skipTests = map[string]string{
5354
//
5455
// TODO(DRIVERS-2225): Re-enable this test once the spec test is updated to
5556
// support the Go pool minPoolSize maintain() behavior.
56-
"TestCMAPSpec/pool-checkout-minPoolSize-connection-maxConnecting.json/threads_blocked_by_maxConnecting_check_out_minPoolSize_connections": "test requires that connections established by minPoolSize are immediately used to satisfy check-out requests (DRIVERS-2225)",
57+
"TestCMAPSpec/pool-checkout-minPoolSize-connection-maxConnecting.json/threads_blocked_by_maxConnecting_check_out_minPoolSize_connections": "Test requires that connections established by minPoolSize are immediately used to satisfy check-out requests (DRIVERS-2225)",
5758

5859
// GODRIVER-1826: The Go connection pool currently delivers any available
5960
// connection to the earliest waiting check-out request, independent of if
@@ -64,10 +65,10 @@ var skipTests = map[string]string{
6465
//
6566
// TODO(DRIVERS-2223): Re-enable this test once the spec test is updated to
6667
// support the Go pool check-in behavior.
67-
"TestCMAPSpec/pool-checkout-returned-connection-maxConnecting.json/threads_blocked_by_maxConnecting_check_out_returned_connections": "test requires a checked-in connections cannot satisfy a check-out waiting on a new connection (DRIVERS-2223)",
68+
"TestCMAPSpec/pool-checkout-returned-connection-maxConnecting.json/threads_blocked_by_maxConnecting_check_out_returned_connections": "Test requires a checked-in connections cannot satisfy a check-out waiting on a new connection (DRIVERS-2223)",
6869

6970
// TODO(GODRIVER-2129): Re-enable this test once GODRIVER-2129 is done.
70-
"TestAuthSpec/connection-string.json/must_raise_an_error_when_the_hostname_canonicalization_is_invalid": "support will be added with GODRIVER-2129.",
71+
"TestAuthSpec/connection-string.json/must_raise_an_error_when_the_hostname_canonicalization_is_invalid": "Support will be added with GODRIVER-2129.",
7172

7273
// GODRIVER-1773: This test runs a "find" with limit=4 and batchSize=3. It
7374
// expects batchSize values of three for the "find" and one for the
@@ -78,9 +79,9 @@ var skipTests = map[string]string{
7879
// GODRIVER-2577: The following spec tests require canceling ops
7980
// immediately, but the current logic clears pools and cancels in-progress
8081
// ops after two the heartbeat failures.
81-
"TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Connection_pool_clear_uses_interruptInUseConnections=true_after_monitor_timeout": "Godriver clears after multiple timeout",
82-
"TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Error_returned_from_connection_pool_clear_with_interruptInUseConnections=true_is_retryable": "Godriver clears after multiple timeout",
83-
"TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Error_returned_from_connection_pool_clear_with_interruptInUseConnections=true_is_retryable_for_write": "Godriver clears after multiple timeout",
82+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Connection_pool_clear_uses_interruptInUseConnections=true_after_monitor_timeout": "Go Driver clears after multiple timeout",
83+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Error_returned_from_connection_pool_clear_with_interruptInUseConnections=true_is_retryable": "Go Driver clears after multiple timeout",
84+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Error_returned_from_connection_pool_clear_with_interruptInUseConnections=true_is_retryable_for_write": "Go Driver clears after multiple timeout",
8485

8586
// TODO(GODRIVER-2843): Fix and unskip these test cases.
8687
"TestUnifiedSpec/sessions/snapshot-sessions.json/Find_operation_with_snapshot": "Test fails frequently. See GODRIVER-2843",
@@ -135,6 +136,28 @@ var skipTests = map[string]string{
135136
// (BadValue) cannot set maxTimeMS on getMore command for a non-awaitData cursor
136137
//
137138
"TestUnifiedSpec/client-side-operations-timeout/runCursorCommand.json/Non-tailable_cursor_lifetime_remaining_timeoutMS_applied_to_getMore_if_timeoutMode_is_unset": "maxTimeMS can't be set on a getMore. See DRIVERS-2953",
139+
140+
// TODO(GODRIVER-2466): Converting SDAM integration spec tests to unified
141+
// test format requires implementing new test operations, such as
142+
// "recordTopologyDescription".
143+
//
144+
// Need to un-skip whenever GODRIVER-2466 is completed.
145+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/rediscover-quickly-after-step-down.json/Rediscover_quickly_after_replSetStepDown": "Implement GODRIVER-2466",
146+
147+
// TODO(GODRIVER-2967): The following log message has been removed from the
148+
// JSON analogue because it assumes that "TopologyDescriptionChangedEvent"
149+
// should occur when a topolgoy is closed. This behavior is not clearly
150+
// defined anywhere and some drivers support and some don't.
151+
//
152+
// Need to un-skip whenever GODRIVER-2967 is completed.
153+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/logging-loadbalanced.json/Topology_lifecycle": "Implement GODRIVER-2967",
154+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/logging-sharded.json/Topology_lifecycle": "Implement GODRIVER-2967",
155+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/logging-replicaset.json/Topology_lifecycle": "Implement GODRIVER-2967",
156+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/logging-standalone.json/Topology_lifecycle": "Implement GODRIVER-2967",
157+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/loadbalanced-emit-topology-changed-before-close.json/Topology_lifecycle": "Implement GODRIVER-2967",
158+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/sharded-emit-topology-changed-before-close.json/Topology_lifecycle": "Implement GODRIVER-2967",
159+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/replicaset-emit-topology-changed-before-close.json/Topology_lifecycle": "Implement GODRIVER-2967",
160+
"TestUnifiedSpec/server-discovery-and-monitoring/unified/standalone-emit-topology-changed-before-close.json/Topology_lifecycle": "Implement GODRIVER-2967",
138161
}
139162

140163
// CheckSkip checks if the fully-qualified test name matches a skipped test

testdata/server-discovery-and-monitoring/integration/rediscover-quickly-after-step-down.json

Lines changed: 0 additions & 165 deletions
This file was deleted.

testdata/server-discovery-and-monitoring/integration/rediscover-quickly-after-step-down.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

testdata/server-discovery-and-monitoring/monitoring/discovered_standalone.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"helloOk": true,
1212
"isWritablePrimary": true,
1313
"minWireVersion": 0,
14-
"maxWireVersion": 4
14+
"maxWireVersion": 21
1515
}
1616
]
1717
],

testdata/server-discovery-and-monitoring/monitoring/discovered_standalone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ phases:
55
responses:
66
-
77
- "a:27017"
8-
- { ok: 1, helloOk: true, isWritablePrimary: true, minWireVersion: 0, maxWireVersion: 4 }
8+
- { ok: 1, helloOk: true, isWritablePrimary: true, minWireVersion: 0, maxWireVersion: 21 }
99

1010
outcome:
1111
events:

0 commit comments

Comments
 (0)