Skip to content

Commit 9c0c3fc

Browse files
authored
Add delay for TestFunctionRepository to make sure the repo is cached (#3831)
1 parent 57ab52e commit 9c0c3fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

porch/test/e2e/e2e_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,14 @@ func (t *PorchSuite) TestFunctionRepository(ctx context.Context) {
654654
// avoid flakiness.
655655
t.waitUntilRepositoryReady(ctx, repo.Name, repo.Namespace)
656656

657+
// Wait here for the repository to be cached in porch. We wait
658+
// first one minute, since Porch waits 1 minute before it syncs
659+
// the repo for the first time. Then wait another minute so that
660+
// the sync has (hopefully) finished.
661+
// TODO(mortent): We need a better solution for this. This is only
662+
// temporary to fix the current flakiness with the e2e tests.
663+
<-time.NewTimer(2 * time.Minute).C
664+
657665
list := &porchapi.FunctionList{}
658666
t.ListE(ctx, list, client.InNamespace(t.namespace))
659667

0 commit comments

Comments
 (0)