Skip to content

Commit

Permalink
test db merge sequential
Browse files Browse the repository at this point in the history
  • Loading branch information
nasdf committed Jun 13, 2024
1 parent 3513390 commit 184f0cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
22 changes: 10 additions & 12 deletions internal/db/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,16 @@ func (db *db) handleMerges(ctx context.Context, sub *event.Subscription) {
if !ok {
continue

Check warning on line 47 in internal/db/merge.go

View check run for this annotation

Codecov / codecov/patch

internal/db/merge.go#L47

Added line #L47 was not covered by tests
}
go func() {
err := db.executeMerge(ctx, merge)
if err != nil {
log.ErrorContextE(
ctx,
"Failed to execute merge",
err,
corelog.String("CID", merge.Cid.String()),
corelog.String("Error", err.Error()),
)
}
}()
err := db.executeMerge(ctx, merge)
if err != nil {
log.ErrorContextE(
ctx,
"Failed to execute merge",
err,
corelog.String("CID", merge.Cid.String()),
corelog.String("Error", err.Error()),
)
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion internal/db/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func (db *db) handleSubscription(ctx context.Context, r *request.Request) (<-cha
if !ok {
return nil, client.NewErrUnexpectedType[request.ObjectSubscription]("SubscriptionSelection", selections)
}
// subscribe to the subscription event bus so we don't block the system bus
sub, err := db.events.Subscribe(event.UpdateName)
if err != nil {
return nil, err
Expand Down
5 changes: 0 additions & 5 deletions tests/integration/utils2.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,6 @@ func setStartingNodes(

s.nodes = append(s.nodes, c)
s.dbPaths = append(s.dbPaths, path)

// subscribe to merge complete events
sub, err := c.Events().Subscribe(event.MergeCompleteName)
require.NoError(s.t, err)
s.eventSubs = append(s.eventSubs, sub)
}
}

Expand Down

0 comments on commit 184f0cc

Please sign in to comment.