diff --git a/services/horizon/internal/db2/history/transaction_test.go b/services/horizon/internal/db2/history/transaction_test.go index 692b720a44..33ef7b0d3c 100644 --- a/services/horizon/internal/db2/history/transaction_test.go +++ b/services/horizon/internal/db2/history/transaction_test.go @@ -242,7 +242,10 @@ func TestInsertTransactionDoesNotAllowDuplicateIndex(t *testing.T) { tt.Assert.NoError(q.Begin()) insertBuilder = q.NewTransactionBatchInsertBuilder() tt.Assert.NoError(insertBuilder.Add(secondTransaction, sequence)) - tt.Assert.Error(insertBuilder.Exec(tt.Ctx, q)) + tt.Assert.EqualError( + insertBuilder.Exec(tt.Ctx, q), + "pq: duplicate key value violates unique constraint \"hs_transaction_by_id\"", + ) tt.Assert.NoError(q.Rollback()) ledger := Ledger{