From 3a3fc36d44f184d51cf64ee61e4dc0c66cea848c Mon Sep 17 00:00:00 2001 From: Rob Smith <34475852+robertdavidsmith@users.noreply.github.com> Date: Fri, 3 Jan 2025 17:06:34 +0000 Subject: [PATCH] Scheduler: fix panic in nodedb benchmark (#4120) Signed-off-by: Robert Smith --- internal/scheduler/nodedb/nodedb_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/scheduler/nodedb/nodedb_test.go b/internal/scheduler/nodedb/nodedb_test.go index 368fdae6277..e8258d140c8 100644 --- a/internal/scheduler/nodedb/nodedb_test.go +++ b/internal/scheduler/nodedb/nodedb_test.go @@ -727,7 +727,8 @@ func benchmarkUpsert(nodes []*internaltypes.Node, b *testing.B) { for i, node := range nodes { err = nodeDb.CreateAndInsertWithJobDbJobsWithTxn(txn, nil, node) require.NoError(b, err) - entry, err := nodeDb.GetNode(node.GetId()) + entry, err := nodeDb.GetNodeWithTxn(txn, node.GetId()) + require.NotNil(b, entry) require.NoError(b, err) entries[i] = entry }