Skip to content

Commit

Permalink
fixing health tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 committed Jan 10, 2025
1 parent 0e5c40d commit 8b02f20
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/services/chainlink/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (h *ApplicationHeartbeat) start(_ context.Context) error {
cme := custmsg.NewLabeler()

// Define tick functions
tickFn := func(engCtx context.Context) {
beatFn := func(engCtx context.Context) {
// TODO allow override of tracer provider into engine for beholder
_, innerSpan := beholder.GetTracer().Start(engCtx, "heartbeat.beat")
defer innerSpan.End()
Expand All @@ -251,7 +251,7 @@ func (h *ApplicationHeartbeat) start(_ context.Context) error {
return h.beat
}

h.eng.GoTick(timeutil.NewTicker(constantTickFn), tickFn)
h.eng.GoTick(timeutil.NewTicker(constantTickFn), beatFn)
return nil
}

Expand Down
3 changes: 3 additions & 0 deletions core/web/testdata/body/health.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
</details>
</details>
</details>
<details open>
<summary title="NodeHeartbeat" class="noexpand"><span class="passing">NodeHeartbeat</span></summary>
</details>
<details open>
<summary title="PipelineORM" class="noexpand"><span class="passing">PipelineORM</span></summary>
</details>
Expand Down
9 changes: 9 additions & 0 deletions core/web/testdata/body/health.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,15 @@
"output": ""
}
},
{
"type": "checks",
"id": "NodeHeartbeat",
"attributes": {
"name": "NodeHeartbeat",
"status": "passing",
"output": ""
}
},
{
"type": "checks",
"id": "PipelineORM",
Expand Down
1 change: 1 addition & 0 deletions core/web/testdata/body/health.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ok JobSpawner
ok Mailbox.Monitor
ok Mercury.WSRPCPool
ok Mercury.WSRPCPool.CacheSet
ok NodeHeartbeat
ok PipelineORM
ok PipelineRunner
ok PipelineRunner.BridgeCache
Expand Down

0 comments on commit 8b02f20

Please sign in to comment.