From 3a3c4426bbc35af5d3be820c68a4ea6b8a105b81 Mon Sep 17 00:00:00 2001 From: Lang Martin Date: Mon, 20 May 2019 15:10:32 -0400 Subject: [PATCH] e2e utils remove ineffectual assignment of allocs --- e2e/e2eutil/utils.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/e2eutil/utils.go b/e2e/e2eutil/utils.go index 7c2212212..1348a5646 100644 --- a/e2e/e2eutil/utils.go +++ b/e2e/e2eutil/utils.go @@ -78,12 +78,13 @@ func RegisterAllocs(t *testing.T, nomadClient *api.Client, jobFile string, jobID } func RegisterAndWaitForAllocs(t *testing.T, nomadClient *api.Client, jobFile string, jobID string) []*api.AllocationListStub { - // Parse job require := require.New(t) - allocs := RegisterAllocs(t, nomadClient, jobFile, jobID) g := NewGomegaWithT(t) jobs := nomadClient.Jobs() + // Start allocations + RegisterAllocs(t, nomadClient, jobFile, jobID) + // Wrap in retry to wait until placement g.Eventually(func() []*api.AllocationListStub { // Look for allocations