Skip to content

Commit 0c70f32

Browse files
committed
Merge branch 'REP-5299-writesoff-timestamp' of github.com:FGasper/migration-verifier into REP-5299-writesoff-timestamp
2 parents 4509091 + 0dea2b9 commit 0c70f32

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/verifier/change_stream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (verifier *Verifier) iterateChangeStream(ctx context.Context, cs *mongo.Cha
215215
break
216216
}
217217

218-
if curTs.Compare(finalTs) >= 0 {
218+
if curTs == finalTs || curTs.After(finalTs) {
219219
verifier.logger.Debug().
220220
Interface("currentTimestamp", curTs).
221221
Interface("finalTimestamp", finalTs).

internal/verifier/integration_test_suite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (suite *IntegrationTestSuite) SetupTest() {
9898
dbNames, err := client.ListDatabaseNames(ctx, bson.D{})
9999
suite.Require().NoError(err, "should list database names")
100100
for _, dbName := range dbNames {
101-
if strings.Index(dbName, suite.DBNameForTest()) == 0 {
101+
if strings.HasPrefix(dbName, suite.DBNameForTest()) {
102102
suite.T().Logf("Dropping database %#q because it seems to be left over from an earlier run of this test.", dbName)
103103
suite.Require().NoError(client.Database(dbName).Drop(ctx))
104104
}

0 commit comments

Comments
 (0)