Skip to content

Commit 994efe6

Browse files
committed
Follow the comments
1 parent bceb235 commit 994efe6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/sqlcache/integration_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ func waitForObjectsBySchema(ctx context.Context, proxyStore *sqlproxy.Store, sch
540540
})
541541
}
542542

543+
// Do not call this if there are no projects -- the function will run until it times out.
543544
func waitForProjectsDisplayName(ctx context.Context, proxyStore *sqlproxy.Store, schema *types.APISchema) error {
544545
return wait.PollUntilContextCancel(ctx, time.Second*10, true, func(ctx context.Context) (done bool, err error) {
545546
req, err := http.NewRequest("GET", "http://localhost:8080", nil)
@@ -553,8 +554,9 @@ func waitForProjectsDisplayName(ctx context.Context, proxyStore *sqlproxy.Store,
553554
list, total, _, err := proxyStore.ListByPartitions(apiOp, schema, partitions)
554555
if err != nil || total == 0 {
555556
// note that we don't return the error since that would stop the polling
556-
return false, err
557+
return false, nil
557558
}
559+
// Moving on, if there are errors return them
558560
for _, item := range list.Items {
559561
displayName, ok, err := unstructured.NestedFieldNoCopy(item.Object, "spec", "displayName")
560562
if !ok || displayName == "" || err != nil {

0 commit comments

Comments
 (0)