Skip to content

DRIVERS-3155 Add topologyClosedEvent and topologyOpeningEvent #1782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion source/unified-test-format/schema-1.20.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@
"connectionCheckedOutEvent",
"connectionCheckedInEvent",
"serverDescriptionChangedEvent",
"topologyDescriptionChangedEvent"
"topologyDescriptionChangedEvent",
"topologyOpeningEvent",
"topologyClosedEvent"
]
}
},
Expand Down
4 changes: 3 additions & 1 deletion source/unified-test-format/schema-1.21.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@
"connectionCheckedOutEvent",
"connectionCheckedInEvent",
"serverDescriptionChangedEvent",
"topologyDescriptionChangedEvent"
"topologyDescriptionChangedEvent",
"topologyOpeningEvent",
"topologyClosedEvent"
]
}
},
Expand Down
6 changes: 4 additions & 2 deletions source/unified-test-format/schema-1.22.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@
"connectionCheckedOutEvent",
"connectionCheckedInEvent",
"serverDescriptionChangedEvent",
"topologyDescriptionChangedEvent"
"topologyDescriptionChangedEvent",
"topologyOpeningEvent",
"topologyClosedEvent"
]
}
},
Expand Down Expand Up @@ -1116,4 +1118,4 @@
}
}
}
}
}
6 changes: 4 additions & 2 deletions source/unified-test-format/schema-1.23.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@
"connectionCheckedOutEvent",
"connectionCheckedInEvent",
"serverDescriptionChangedEvent",
"topologyDescriptionChangedEvent"
"topologyDescriptionChangedEvent",
"topologyOpeningEvent",
"topologyClosedEvent"
]
}
},
Expand Down Expand Up @@ -1156,4 +1158,4 @@
}
}
}
}
}
6 changes: 4 additions & 2 deletions source/unified-test-format/schema-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@
"connectionCheckedOutEvent",
"connectionCheckedInEvent",
"serverDescriptionChangedEvent",
"topologyDescriptionChangedEvent"
"topologyDescriptionChangedEvent",
"topologyOpeningEvent",
"topologyClosedEvent"
]
}
},
Expand Down Expand Up @@ -1156,4 +1158,4 @@
}
}
}
}
}
17 changes: 17 additions & 0 deletions source/unified-test-format/unified-test-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ The structure of this object is as follows:
- [serverHeartbeatSucceededEvent](#expectedEvent_serverHeartbeatSucceededEvent)
- [serverHeartbeatFailedEvent](#expectedEvent_serverHeartbeatFailedEvent)
- [topologyDescriptionChangedEvent](#expectedEvent_topologyDescriptionChangedEvent)
- [topologyOpeningEvent](#expectedEvent_topologyOpeningEvent)
- [topologyClosedEvent](#expectedEvent_topologyClosedEvent)

<span id="entity_client_ignoreCommandMonitoringEvents"></span>

Expand Down Expand Up @@ -1231,6 +1233,18 @@ The structure of this object is as follows:
Test runners SHOULD ignore any other fields present on the `previousDescription` and `newDescription` fields of the
captured `topologyDescriptionChangedEvent`.

<span id="expectedEvent_topologyOpeningEvent"></span>

- `topologyOpeningEvent`: Optional object. Assertions for one
[topologyOpeningEvent](../server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.md#events-api)
object.

<span id="expectedEvent_topologyClosedEvent"></span>

- `topologyClosedEvent`: Optional object. Assertions for one
[topologyClosedEvent](../server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.md#events-api)
object.

##### hasServiceId

This field is an optional boolean that specifies whether or not the `serviceId` field of an event is set. If true, test
Expand Down Expand Up @@ -3555,6 +3569,9 @@ other specs *and* collating spec changes developed in parallel or during the sam

## Changelog

- 2025-04-07: Add `topologyOpeningEvent` and `topologyClosedEvent` to the unified test format and schema 1.20+ as they
were omitted in error.

- 2025-01-21: **Schema version 1.23.**

Support automatic encryption. Add `autoEncryptOpts` to `client` entity.
Expand Down
Loading