File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
x/mongo/driver/drivertest Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 4545 Max : driverutil .MaxWireVersion ,
4646 },
4747 }
48+
49+ // ErrNoResponsesRemaining is the error returned when the mocked connection is asked for a response and does not have
50+ // any responses buffered.
51+ ErrNoResponsesRemaining = errors .New ("no responses remaining" )
4852)
4953
5054// connection implements the driver.Connection interface and responds to wire messages with pre-configured responses.
@@ -71,7 +75,7 @@ func (c *connection) SetOIDCTokenGenID(uint64) {
7175func (c * connection ) Read (_ context.Context ) ([]byte , error ) {
7276 var dst []byte
7377 if len (c .responses ) == 0 {
74- return dst , errors . New ( "no responses remaining" )
78+ return dst , ErrNoResponsesRemaining
7579 }
7680 nextRes := c .responses [0 ]
7781 c .responses = c .responses [1 :]
You can’t perform that action at this time.
0 commit comments