@@ -32,8 +32,8 @@ non-auth, and non-compression connections.
32
32
33
33
#### Recover Partial Header Response
34
34
35
- This test verifies that if only part of a response header arrives before a socket timeout, the driver can drain the rest
36
- of the response and reuse the connection for the next operation.
35
+ This test verifies that if only part of a response header arrives before a timeout, the driver can drain the rest of the
36
+ response and reuse the connection for the next operation.
37
37
38
38
1 . Connect to the proxy server with ` maxPoolSize=1 ` and ` direct=true ` , subscribing to the following CMAP events:
39
39
- ` PendingResponseStarted `
@@ -44,12 +44,14 @@ of the response and reuse the connection for the next operation.
44
44
- ` sendBytes ` : any value between 1 and 3
45
45
- ` delayMS ` : 400 ( to exceed the 200 ms timeout)
46
46
- ` sendAll ` : ` true `
47
- 3 . Issue any follow-up operation and assert that it does not return an error.
48
- 4 . Verify that we've received the following events from the ` insertOne ` step:
49
- - 1x` ConnectionPendingResponseStarted `
50
- - 0x` ConnectionPendingResponseFailed `
51
- - 1x` ConnectionPendingResponseSucceeded `
52
- - 0x` ConnectionClosed `
47
+ 3 . Assert that the operation failed with timeout error.
48
+ 4 . Issue another operation (e.g. another insert) and assert that it does not return an error.
49
+ 5 . Verify that the following sequence of events was observed:
50
+ - ` ConnectionPendingResponseStarted `
51
+ - ` ConnectionPendingResponseSucceeded `
52
+ 6 . Verify that NONE the following events was observed:
53
+ - ` ConnectionPendingResponseFailed `
54
+ - ` ConnectionClosed `
53
55
54
56
#### Recover Partial Body Response
55
57
@@ -65,16 +67,18 @@ of the response and reuse the connection for the next operation.
65
67
- ` sendBytes ` : Any value > 16
66
68
- ` delayMS ` : 400 ( to exceed the 200 ms timeout)
67
69
- ` sendAll ` : ` true `
68
- 3 . Issue any follow-up operation and assert that it does not return an error.
69
- 4 . Verify that we've received the following events from the ` insertOne ` step:
70
- - 1x` ConnectionPendingResponseStarted `
71
- - 0x` ConnectionPendingResponseFailed `
72
- - 1x` ConnectionPendingResponseSucceeded `
73
- - 0x` ConnectionClosed `
70
+ 3 . Assert that the operation failed with timeout error.
71
+ 4 . Issue another operation (e.g. another insert) and assert that it does not return an error.
72
+ 5 . Verify that the following sequence of events was observed:
73
+ - ` ConnectionPendingResponseStarted `
74
+ - ` ConnectionPendingResponseSucceeded `
75
+ 6 . Verify that NONE the following events was observed:
76
+ - ` ConnectionPendingResponseFailed `
77
+ - ` ConnectionClosed `
74
78
75
79
#### Non-destructive Aliveness Check
76
80
77
- This test verifies that if a connection idles past the driver's aliveness window (3 seconds) after a partial header, the
81
+ This test verifies that if a connection idles past the pending response window (3 seconds) after a partial header, the
78
82
aliveness check does not attempt to discard bytes from the TCP stream.
79
83
80
84
1 . Connect to the proxy server with ` maxPoolSize=1 ` and ` direct=true ` , subscribing to the following CMAP events:
@@ -86,13 +90,16 @@ aliveness check does not attempt to discard bytes from the TCP stream.
86
90
- ` sendBytes ` : any value between 1 and 3
87
91
- ` delayMS ` : 400 ( to exceed the 200 ms timeout)
88
92
- ` sendAll ` : ` true `
89
- 3 . Sleep for 3 seconds
90
- 4 . Issue any follow-up operation and assert that it does not return an error.
91
- 5 . Verify that we've received the following events from the ` insertOne ` step:
92
- - 2x` ConnectionPendingResponseStarted `
93
- - 1x` ConnectionPendingResponseFailed `
94
- - 1x` ConnectionPendingResponseSucceeded `
95
- - 0x` ConnectionClosed `
93
+ 3 . Assert that the operation failed with timeout error.
94
+ 4 . Sleep for 3 seconds
95
+ 5 . Issue another operation (e.g. another insert) and assert that it does not return an error.
96
+ 6 . Verify that the following sequence of events was observed:
97
+ - ` ConnectionPendingResponseStarted `
98
+ - ` ConnectionPendingResponseFailed `
99
+ - ` ConnectionPendingResponseStarted `
100
+ - ` ConnectionPendingResponseSucceeded `
101
+ 7 . Verify that NONE the following events was observed:
102
+ - ` ConnectionClosed `
96
103
97
104
#### Exhaust Cursors
98
105
0 commit comments