Skip to content

Commit

Permalink
Add delay for TestFunctionRepository to make sure the repo is cached (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mortent authored Feb 24, 2023
1 parent 57ab52e commit 9c0c3fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions porch/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,14 @@ func (t *PorchSuite) TestFunctionRepository(ctx context.Context) {
// avoid flakiness.
t.waitUntilRepositoryReady(ctx, repo.Name, repo.Namespace)

// Wait here for the repository to be cached in porch. We wait
// first one minute, since Porch waits 1 minute before it syncs
// the repo for the first time. Then wait another minute so that
// the sync has (hopefully) finished.
// TODO(mortent): We need a better solution for this. This is only
// temporary to fix the current flakiness with the e2e tests.
<-time.NewTimer(2 * time.Minute).C

list := &porchapi.FunctionList{}
t.ListE(ctx, list, client.InNamespace(t.namespace))

Expand Down

0 comments on commit 9c0c3fc

Please sign in to comment.