@@ -23,16 +23,12 @@ The following tests have not yet been automated, but MUST still be tested:
23
23
24
24
### Pending Response
25
25
26
- If a connection with a pending response is idle for > 3 seconds, then drivers are expected to perform an aliveness check
27
- by attempting a non-blocking read of 1 byte from the inbound TCP buffer. The following two cases test both a successful
28
- read and a failed one.
29
-
30
26
Due to the complexity of managing a proxy layer, the following qualifying tests should only be run for non-ssl,
31
27
non-auth, and non-compression connections.
32
28
33
- #### Recover Partial Header Response
29
+ #### Recover Partially Read Response
34
30
35
- This test verifies that if only part of a response header arrives before a timeout, the driver can drain the rest of the
31
+ This test verifies that if only part of a response was read before the timeout, the driver can drain the rest of the
36
32
response and reuse the connection for the next operation.
37
33
38
34
1 . Connect to the proxy server with ` maxPoolSize=1 ` and ` direct=true ` , subscribing to the following CMAP events:
@@ -41,30 +37,9 @@ response and reuse the connection for the next operation.
41
37
- ` PendingResponseFailed `
42
38
- ` ConnectionClosed `
43
39
2 . Send a command (e.g. an insert) with a 200 millisecond timeout and the following ` proxyTest ` actions:
44
- - ` sendBytes ` : any value between 1 and 3
45
- - ` delayMS ` : 400 ( to exceed the 200 ms timeout)
46
- - ` sendAll ` : ` true `
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 `
55
-
56
- #### Recover Partial Body Response
57
-
58
- This test verifies that if only part of a response body arrives before a socket timeout, the driver can drain the rest
59
- of the response and reuse the connection for the next operation.
60
-
61
- 1 . Connect to the proxy server with ` maxPoolSize=1 ` and ` direct=true ` , subscribing to the following CMAP events:
62
- - ` PendingResponseStarted `
63
- - ` PendingResponseSucceeded `
64
- - ` PendingResponseFailed `
65
- - ` ConnectionClosed `
66
- 2 . Send a command (e.g. an insert) with a 200 millisecond timeout and the following ` proxyTest ` actions:
67
- - ` sendBytes ` : Any value > 16
40
+ - ` sendBytes ` : We have 3 possible states here: a) Message size was partially read: random value between 1 and 3
41
+ inclusive b) Message size was read, body was not read at all: use 4 c) Message size was read, body read
42
+ partially: random value between 5 and 100 inclusive
68
43
- ` delayMS ` : 400 ( to exceed the 200 ms timeout)
69
44
- ` sendAll ` : ` true `
70
45
3 . Assert that the operation failed with timeout error.
0 commit comments