From 5d80d2a511a6d79aaee62a075cd067f67644b549 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 26 May 2020 18:18:59 -0400 Subject: [PATCH] tests: eval may be processed quickly --- nomad/node_endpoint_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nomad/node_endpoint_test.go b/nomad/node_endpoint_test.go index 8d56bf2c9..0324627ae 100644 --- a/nomad/node_endpoint_test.go +++ b/nomad/node_endpoint_test.go @@ -2509,7 +2509,12 @@ func TestClientEndpoint_CreateNodeEvals(t *testing.T) { require.Equal(t, structs.EvalTriggerNodeUpdate, eval.TriggeredBy) require.Equal(t, alloc.NodeID, eval.NodeID) require.Equal(t, uint64(1), eval.NodeModifyIndex) - require.Equal(t, structs.EvalStatusPending, eval.Status) + switch eval.Status { + case structs.EvalStatusPending, structs.EvalStatusComplete: + // success + default: + require.Equal(t, structs.EvalStatusPending, eval.Status) + } require.Equal(t, expPriority, eval.Priority) require.Equal(t, expJobID, eval.JobID) require.NotZero(t, eval.CreateTime)