mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
tests: deflake client TestFS_Logs_TaskPending test
This commit is contained in:
@@ -891,7 +891,7 @@ func TestFS_Logs_TaskPending(t *testing.T) {
|
||||
job := mock.BatchJob()
|
||||
job.TaskGroups[0].Count = 1
|
||||
job.TaskGroups[0].Tasks[0].Config = map[string]interface{}{
|
||||
"start_block_for": "4s",
|
||||
"start_block_for": "10s",
|
||||
}
|
||||
|
||||
// Register job
|
||||
@@ -916,6 +916,12 @@ func TestFS_Logs_TaskPending(t *testing.T) {
|
||||
}
|
||||
|
||||
allocID = resp.Allocations[0].ID
|
||||
|
||||
// wait for alloc runner to be created; otherwise, we get no alloc found error
|
||||
if _, err := c.getAllocRunner(allocID); err != nil {
|
||||
return false, fmt.Errorf("alloc runner was not created yet for %v", allocID)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}, func(err error) {
|
||||
t.Fatalf("error getting alloc id: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user