autopilot: fix race condition in new test
This commit is contained in:
parent
acd8a6e302
commit
083b574fd8
@ -338,6 +338,11 @@ func TestAgentHeuristicUpdateSignal(t *testing.T) {
|
||||
testCtx, cleanup := setup(t, nil)
|
||||
defer cleanup()
|
||||
|
||||
pub, err := testCtx.graph.addRandNode()
|
||||
if err != nil {
|
||||
t.Fatalf("unable to generate key: %v", err)
|
||||
}
|
||||
|
||||
// We'll send an initial "no" response to advance the agent past its
|
||||
// initial check.
|
||||
respondMoreChans(t, testCtx, moreChansResp{0, 0})
|
||||
@ -356,10 +361,6 @@ func TestAgentHeuristicUpdateSignal(t *testing.T) {
|
||||
|
||||
// At this point, the agent should now be querying the heuristic for
|
||||
// scores. We'll respond.
|
||||
pub, err := testCtx.graph.addRandNode()
|
||||
if err != nil {
|
||||
t.Fatalf("unable to generate key: %v", err)
|
||||
}
|
||||
nodeID := NewNodeID(pub)
|
||||
scores := map[NodeID]*NodeScore{
|
||||
nodeID: {
|
||||
|
Loading…
Reference in New Issue
Block a user