Skip to content

Commit

Permalink
Change eval_endpoint test to not retry but block longer
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Jun 3, 2016
1 parent c84cea2 commit 455688e
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions nomad/eval_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,21 +669,13 @@ func TestEvalEndpoint_Reblock(t *testing.T) {
t.Fatal(err)
}

var out *structs.Evaluation
var token string
var err error
testutil.WaitForResult(func() (bool, error) {
out, token, err = s1.evalBroker.Dequeue(defaultSched, time.Second)
if err != nil {
return false, err
}
if out == nil {
return false, nil
}
return true, nil
}, func(err error) {
t.Fatal(err)
})
out, token, err := s1.evalBroker.Dequeue(defaultSched, 2*time.Second)
if err != nil {
t.Fatalf("err: %v", err)
}
if out == nil {
t.Fatalf("bad: %v", out)
}

get := &structs.EvalUpdateRequest{
Evals: []*structs.Evaluation{eval1},
Expand Down

0 comments on commit 455688e

Please sign in to comment.