fix: Simplify provisionerd job acquire (#158)

This uses a simple channel to detect whether a
job is running or not, and moves all cancels
to be in goroutines.
This commit is contained in:
Kyle Carberry
2022-02-03 19:13:22 -06:00
committed by GitHub
parent 7884b43c78
commit c65850b654
11 changed files with 186 additions and 131 deletions

View File

@ -56,6 +56,7 @@ func TestWorkspaceHistory(t *testing.T) {
require.Eventually(t, func() bool {
hist, err := client.ProjectHistory(context.Background(), user.Organization, project.Name, projectHistory.Name)
require.NoError(t, err)
t.Logf("Import status: %s\n", hist.Import.Status)
return hist.Import.Status.Completed()
}, 15*time.Second, 50*time.Millisecond)
return projectHistory