Skip to content

Commit

Permalink
core/services/job: close test peer wrappers (#11349)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 authored Nov 21, 2023
1 parent 0c8c1cd commit 98ac92b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/services/job/orm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

func NewTestORM(t *testing.T, db *sqlx.DB, pipelineORM pipeline.ORM, bridgeORM bridges.ORM, keyStore keystore.Master, cfg pg.QConfig) job.ORM {
o := job.NewORM(db, pipelineORM, bridgeORM, keyStore, logger.TestLogger(t), cfg)
t.Cleanup(func() { o.Close() })
t.Cleanup(func() { assert.NoError(t, o.Close()) })
return o
}

Expand Down
6 changes: 5 additions & 1 deletion core/services/job/runner_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ answer1 [type=median index=0];
assert.NoError(t, err)
pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), config.Database(), db, lggr)
require.NoError(t, pw.Start(testutils.Context(t)))
t.Cleanup(func() { assert.NoError(t, pw.Close()) })
sd := ocr.NewDelegate(
db,
jobORM,
Expand Down Expand Up @@ -484,6 +485,7 @@ answer1 [type=median index=0];
lggr := logger.TestLogger(t)
pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), config.Database(), db, lggr)
require.NoError(t, pw.Start(testutils.Context(t)))
t.Cleanup(func() { assert.NoError(t, pw.Close()) })
sd := ocr.NewDelegate(
db,
jobORM,
Expand Down Expand Up @@ -512,6 +514,7 @@ answer1 [type=median index=0];
lggr := logger.TestLogger(t)
pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), config.Database(), db, lggr)
require.NoError(t, pw.Start(testutils.Context(t)))
t.Cleanup(func() { assert.NoError(t, pw.Close()) })
sd := ocr.NewDelegate(
db,
jobORM,
Expand Down Expand Up @@ -566,6 +569,7 @@ answer1 [type=median index=0];
lggr := logger.TestLogger(t)
pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), config.Database(), db, lggr)
require.NoError(t, pw.Start(testutils.Context(t)))
t.Cleanup(func() { assert.NoError(t, pw.Close()) })
sd := ocr.NewDelegate(
db,
jobORM,
Expand Down Expand Up @@ -610,7 +614,7 @@ answer1 [type=median index=0];
lggr := logger.TestLogger(t)
pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), config.Database(), db, lggr)
require.NoError(t, pw.Start(testutils.Context(t)))

t.Cleanup(func() { assert.NoError(t, pw.Close()) })
sd := ocr.NewDelegate(
db,
jobORM,
Expand Down

0 comments on commit 98ac92b

Please sign in to comment.