Skip to content

Commit 3a99e3a

Browse files
authored
e2e: add delay after registering Repository (#3741)
I believe this will help avoid the "failed to list resources" error immediately after registering a repository.
1 parent af926a0 commit 3a99e3a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

porch/test/e2e/e2e_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,6 +2152,11 @@ func (t *PorchSuite) registerGitRepositoryF(ctx context.Context, repo, name, dir
21522152
},
21532153
})
21542154

2155+
// TODO: Replace with readiness check or similar, once we get to CRDs
2156+
// Sometimes we see "failed to list resources" here, I believe because we need to wait for the repository to be crawled.
2157+
t.Logf("HACK: sleeping for 5 seconds to allow for repository registration")
2158+
time.Sleep(5 * time.Second)
2159+
21552160
t.Cleanup(func() {
21562161
t.DeleteL(ctx, &configapi.Repository{
21572162
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)