[DRIVERS-2115] CMAP tests are missing coverage for connection establishment failure Created: 21/Jan/20  Updated: 10/Jan/23  Resolved: 10/Jan/23

Status: Closed
Project: Drivers
Component/s: CMAP
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Matt Broadstone Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate

 Description   

The CMAP spec is a little bit light on tests around the behavior of failed attempts to create a connection. For instance, the "checkOut" pseudocode indicates that a connection should be created if totalConnectionCount < maxPoolSize, but its easy to miss that a ConnectionCheckOutFailedEvent should be emitted if that connection fails to connect. 

It seems we could generally improve test coverage around the creation of connections. It might be enough to add a flag to the checkOut test runner operation informing the runner that the operation should fail with a specific error type. If the checkOut fails with failToCreateConnection, then we should expect a ConnectionCheckOutFailedEvent

 

 



 Comments   
Comment by Divjot Arora (Inactive) [ 28/Sep/20 ]

patrick.freed and I think this is a valuable ticket as it would add coverage for an important part of the spec. Also, the existing prose test is not implemented by all drivers.

CC kaitlin.mahar kevin.albertson rachelle.palmer

Comment by Shane Harvey [ 21/Jan/20 ]

Yeah I agree. Spec tests are always better and your checkOut idea seems simpler to implement than the prose test. I recommend removing the prose test when we make this change. (And DRIVERS-688 was the tracking ticket for SPEC-1298).

Comment by Matt Broadstone [ 21/Jan/20 ]

Yes, I think it does but propose a unit test as the prose tests are easily missed (I don't think any DRIVERS tickets were made for that change either!). 

Comment by Shane Harvey [ 21/Jan/20 ]

Do you think the prose test added in SPEC-1298 should cover this case?

Generated at Thu Feb 08 08:24:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.