Skip to content

Commit 1752645

Browse files
GODRIVER-3173 Update test runner to use response over read
1 parent d15516d commit 1752645

File tree

4 files changed

+40
-917
lines changed

4 files changed

+40
-917
lines changed

internal/integration/unified/event.go

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@ import (
1616
type monitoringEventType string
1717

1818
const (
19-
commandStartedEvent monitoringEventType = "CommandStartedEvent"
20-
commandSucceededEvent monitoringEventType = "CommandSucceededEvent"
21-
commandFailedEvent monitoringEventType = "CommandFailedEvent"
22-
poolCreatedEvent monitoringEventType = "PoolCreatedEvent"
23-
poolReadyEvent monitoringEventType = "PoolReadyEvent"
24-
poolClearedEvent monitoringEventType = "PoolClearedEvent"
25-
poolClosedEvent monitoringEventType = "PoolClosedEvent"
26-
connectionCreatedEvent monitoringEventType = "ConnectionCreatedEvent"
27-
connectionReadyEvent monitoringEventType = "ConnectionReadyEvent"
28-
connectionClosedEvent monitoringEventType = "ConnectionClosedEvent"
29-
connectionCheckOutStartedEvent monitoringEventType = "ConnectionCheckOutStartedEvent"
30-
connectionCheckOutFailedEvent monitoringEventType = "ConnectionCheckOutFailedEvent"
31-
connectionCheckedOutEvent monitoringEventType = "ConnectionCheckedOutEvent"
32-
connectionCheckedInEvent monitoringEventType = "ConnectionCheckedInEvent"
33-
connectionPendingReadStarted monitoringEventType = "ConnectionPendingReadStarted"
34-
connectionPendingReadSucceeded monitoringEventType = "ConnectionPendingReadSucceeded"
35-
connectionPendingReadFailed monitoringEventType = "ConnectionPendingReadFailed"
36-
serverDescriptionChangedEvent monitoringEventType = "ServerDescriptionChangedEvent"
37-
serverHeartbeatFailedEvent monitoringEventType = "ServerHeartbeatFailedEvent"
38-
serverHeartbeatStartedEvent monitoringEventType = "ServerHeartbeatStartedEvent"
39-
serverHeartbeatSucceededEvent monitoringEventType = "ServerHeartbeatSucceededEvent"
40-
topologyDescriptionChangedEvent monitoringEventType = "TopologyDescriptionChangedEvent"
41-
topologyOpeningEvent monitoringEventType = "TopologyOpeningEvent"
42-
topologyClosedEvent monitoringEventType = "TopologyClosedEvent"
19+
commandStartedEvent monitoringEventType = "CommandStartedEvent"
20+
commandSucceededEvent monitoringEventType = "CommandSucceededEvent"
21+
commandFailedEvent monitoringEventType = "CommandFailedEvent"
22+
poolCreatedEvent monitoringEventType = "PoolCreatedEvent"
23+
poolReadyEvent monitoringEventType = "PoolReadyEvent"
24+
poolClearedEvent monitoringEventType = "PoolClearedEvent"
25+
poolClosedEvent monitoringEventType = "PoolClosedEvent"
26+
connectionCreatedEvent monitoringEventType = "ConnectionCreatedEvent"
27+
connectionReadyEvent monitoringEventType = "ConnectionReadyEvent"
28+
connectionClosedEvent monitoringEventType = "ConnectionClosedEvent"
29+
connectionCheckOutStartedEvent monitoringEventType = "ConnectionCheckOutStartedEvent"
30+
connectionCheckOutFailedEvent monitoringEventType = "ConnectionCheckOutFailedEvent"
31+
connectionCheckedOutEvent monitoringEventType = "ConnectionCheckedOutEvent"
32+
connectionCheckedInEvent monitoringEventType = "ConnectionCheckedInEvent"
33+
connectionPendingResponseStarted monitoringEventType = "ConnectionPendingResponseStarted"
34+
connectionPendingResponseSucceeded monitoringEventType = "ConnectionPendingResponseSucceeded"
35+
connectionPendingResponseFailed monitoringEventType = "ConnectionPendingResponseFailed"
36+
serverDescriptionChangedEvent monitoringEventType = "ServerDescriptionChangedEvent"
37+
serverHeartbeatFailedEvent monitoringEventType = "ServerHeartbeatFailedEvent"
38+
serverHeartbeatStartedEvent monitoringEventType = "ServerHeartbeatStartedEvent"
39+
serverHeartbeatSucceededEvent monitoringEventType = "ServerHeartbeatSucceededEvent"
40+
topologyDescriptionChangedEvent monitoringEventType = "TopologyDescriptionChangedEvent"
41+
topologyOpeningEvent monitoringEventType = "TopologyOpeningEvent"
42+
topologyClosedEvent monitoringEventType = "TopologyClosedEvent"
4343
)
4444

4545
func monitoringEventTypeFromString(eventStr string) (monitoringEventType, bool) {
@@ -72,12 +72,12 @@ func monitoringEventTypeFromString(eventStr string) (monitoringEventType, bool)
7272
return connectionCheckedOutEvent, true
7373
case "connectioncheckedinevent":
7474
return connectionCheckedInEvent, true
75-
case "connectionpendingreadstarted":
76-
return connectionPendingReadStarted, true
77-
case "connectionpendingreadsucceeded":
78-
return connectionPendingReadSucceeded, true
79-
case "connectionpendingreadfailed":
80-
return connectionPendingReadFailed, true
75+
case "connectionpendingresponsestarted":
76+
return connectionPendingResponseStarted, true
77+
case "connectionpendingresponsesucceeded":
78+
return connectionPendingResponseSucceeded, true
79+
case "connectionpendingresponsefailed":
80+
return connectionPendingResponseFailed, true
8181
case "serverdescriptionchangedevent":
8282
return serverDescriptionChangedEvent, true
8383
case "serverheartbeatfailedevent":
@@ -122,11 +122,11 @@ func monitoringEventTypeFromPoolEvent(evt *event.PoolEvent) monitoringEventType
122122
case event.ConnectionCheckedIn:
123123
return connectionCheckedInEvent
124124
case event.ConnectionPendingResponseStarted:
125-
return connectionPendingReadStarted
125+
return connectionPendingResponseStarted
126126
case event.ConnectionPendingResponseSucceeded:
127-
return connectionPendingReadSucceeded
127+
return connectionPendingResponseSucceeded
128128
case event.ConnectionPendingResponseFailed:
129-
return connectionPendingReadFailed
129+
return connectionPendingResponseFailed
130130
default:
131131
return ""
132132
}

internal/integration/unified/event_verification.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ type cmapEvent struct {
5656
Reason *string `bson:"reason"`
5757
} `bson:"connectionCheckOutFailedEvent"`
5858

59-
ConnectionCheckedInEvent *struct{} `bson:"connectionCheckedInEvent"`
60-
ConnectionPendingReadStarted *struct{} `bson:"connectionPendingReadStarted"`
61-
ConnectionPendingreadSucceeded *struct{} `bson:"connectionPendingReadSucceeded"`
62-
ConnectionPendingReadFailed *struct{} `bson:"connectionPendingReadFailed"`
59+
ConnectionCheckedInEvent *struct{} `bson:"connectionCheckedInEvent"`
60+
ConnectionPendingResponseStarted *struct{} `bson:"connectionPendingResponseStarted"`
61+
ConnectionPendingResponseSucceeded *struct{} `bson:"connectionPendingResponseSucceeded"`
62+
ConnectionPendingResponseFailed *struct{} `bson:"connectionPendingResponseFailed"`
6363

6464
PoolClearedEvent *struct {
6565
HasServiceID *bool `bson:"hasServiceId"`
@@ -362,15 +362,15 @@ func verifyCMAPEvents(client *clientEntity, expectedEvents *expectedEvents) erro
362362
if _, pooled, err = getNextPoolEvent(pooled, event.ConnectionCheckedIn); err != nil {
363363
return newEventVerificationError(idx, client, "failed to get next pool event: %v", err.Error())
364364
}
365-
case evt.ConnectionPendingReadStarted != nil:
365+
case evt.ConnectionPendingResponseStarted != nil:
366366
if _, pooled, err = getNextPoolEvent(pooled, event.ConnectionPendingResponseStarted); err != nil {
367367
return newEventVerificationError(idx, client, "failed to get next pool event: %v", err.Error())
368368
}
369-
case evt.ConnectionPendingreadSucceeded != nil:
369+
case evt.ConnectionPendingResponseSucceeded != nil:
370370
if _, pooled, err = getNextPoolEvent(pooled, event.ConnectionPendingResponseSucceeded); err != nil {
371371
return newEventVerificationError(idx, client, "failed to get next pool event: %v", err.Error())
372372
}
373-
case evt.ConnectionPendingReadFailed != nil:
373+
case evt.ConnectionPendingResponseFailed != nil:
374374
if _, pooled, err = getNextPoolEvent(pooled, event.ConnectionPendingResponseFailed); err != nil {
375375
return newEventVerificationError(idx, client, "failed to get next pool event: %v", err.Error())
376376
}

0 commit comments

Comments
 (0)