Scheduler internal NodeTree thread-safe NumNodes
Signed-off-by: Adrián Orive <adrian.orive.oneca@gmail.com>
This commit is contained in:

committed by
Adrián Orive

parent
468c99ea24
commit
c7cba7370f
@@ -116,8 +116,8 @@ func verifyNodeTree(t *testing.T, nt *NodeTree, expectedTree map[string]*nodeArr
|
||||
for _, na := range expectedTree {
|
||||
expectedNumNodes += len(na.nodes)
|
||||
}
|
||||
if nt.NumNodes != expectedNumNodes {
|
||||
t.Errorf("unexpected NodeTree.numNodes. Expected: %v, Got: %v", expectedNumNodes, nt.NumNodes)
|
||||
if numNodes := nt.NumNodes(); numNodes != expectedNumNodes {
|
||||
t.Errorf("unexpected NodeTree.numNodes. Expected: %v, Got: %v", expectedNumNodes, numNodes)
|
||||
}
|
||||
if !reflect.DeepEqual(nt.tree, expectedTree) {
|
||||
t.Errorf("The node tree is not the same as expected. Expected: %v, Got: %v", expectedTree, nt.tree)
|
||||
|
Reference in New Issue
Block a user