Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikiyer56 committed Nov 5, 2024
1 parent d2dcc0f commit e6b26a8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions services/horizon/internal/ingest/processor_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestProcessorRunnerRunHistoryArchiveIngestionHistoryArchive(t *testing.T) {
q := &mockDBQ{}
defer mock.AssertExpectationsForObjects(t, q)
historyAdapter := &mockHistoryArchiveAdapter{}
defer mock.AssertExpectationsForObjects(t, historyAdapter) // this will fail
defer mock.AssertExpectationsForObjects(t, historyAdapter)

m := &ingest.MockChangeReader{}
m.On("Close").Return(nil).Once()
Expand Down Expand Up @@ -65,7 +65,14 @@ func TestProcessorRunnerRunHistoryArchiveIngestionHistoryArchive(t *testing.T) {
).Once()

batchBuilders := mockChangeProcessorBatchBuilders(q, ctx, true)
defer mock.AssertExpectationsForObjects(t, batchBuilders...) // currently failing
defer mock.AssertExpectationsForObjects(t, batchBuilders...)

assert.IsType(t, &history.MockAccountSignersBatchInsertBuilder{}, batchBuilders[0])
batchBuilders[0].(*history.MockAccountSignersBatchInsertBuilder).On("Add", history.AccountSigner{
Account: "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
Signer: "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
Weight: 1,
}).Return(nil).Once()

assert.IsType(t, &history.MockAccountsBatchInsertBuilder{}, batchBuilders[1])
batchBuilders[1].(*history.MockAccountsBatchInsertBuilder).On("Add", history.AccountEntry{
Expand All @@ -76,13 +83,6 @@ func TestProcessorRunnerRunHistoryArchiveIngestionHistoryArchive(t *testing.T) {
MasterWeight: 1,
}).Return(nil).Once()

assert.IsType(t, &history.MockAccountSignersBatchInsertBuilder{}, batchBuilders[0])
batchBuilders[0].(*history.MockAccountSignersBatchInsertBuilder).On("Add", history.AccountSigner{
Account: "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
Signer: "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
Weight: 1,
}).Return(nil).Once()

q.MockQAssetStats.On("InsertAssetStats", ctx, []history.ExpAssetStat{}, 100000).
Return(nil)

Expand Down

0 comments on commit e6b26a8

Please sign in to comment.