From ccfcaf96a3e53a8322a7fcd050b92a254cf12b1a Mon Sep 17 00:00:00 2001 From: Ramit Mittal Date: Sat, 30 Sep 2023 14:01:04 +0530 Subject: [PATCH] GODRIVER-2075 Update "mtest.T.Get*Event()" documentation --- mongo/integration/mtest/mongotest.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/mongo/integration/mtest/mongotest.go b/mongo/integration/mtest/mongotest.go index d5235d228e..e16ab262ad 100644 --- a/mongo/integration/mtest/mongotest.go +++ b/mongo/integration/mtest/mongotest.go @@ -278,11 +278,9 @@ func (t *T) ClearMockResponses() { t.mockDeployment.clearResponses() } -// GetStartedEvent returns the most recent CommandStartedEvent, or nil if one is not present. +// GetStartedEvent returns the least recent CommandStartedEvent, or nil if one is not present. // This can only be called once per event. func (t *T) GetStartedEvent() *event.CommandStartedEvent { - // TODO(GODRIVER-2075): GetStartedEvent documents that it returns the most recent event, but actually returns the first - // TODO event. Update either the documentation or implementation. if len(t.started) == 0 { return nil } @@ -291,11 +289,9 @@ func (t *T) GetStartedEvent() *event.CommandStartedEvent { return e } -// GetSucceededEvent returns the most recent CommandSucceededEvent, or nil if one is not present. +// GetSucceededEvent returns the least recent CommandSucceededEvent, or nil if one is not present. // This can only be called once per event. func (t *T) GetSucceededEvent() *event.CommandSucceededEvent { - // TODO(GODRIVER-2075): GetSucceededEvent documents that it returns the most recent event, but actually returns the - // TODO first event. Update either the documentation or implementation. if len(t.succeeded) == 0 { return nil } @@ -304,11 +300,9 @@ func (t *T) GetSucceededEvent() *event.CommandSucceededEvent { return e } -// GetFailedEvent returns the most recent CommandFailedEvent, or nil if one is not present. +// GetFailedEvent returns the least recent CommandFailedEvent, or nil if one is not present. // This can only be called once per event. func (t *T) GetFailedEvent() *event.CommandFailedEvent { - // TODO(GODRIVER-2075): GetFailedEvent documents that it returns the most recent event, but actually returns the first - // TODO event. Update either the documentation or implementation. if len(t.failed) == 0 { return nil }