You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A goroutine occurs while using wait.For(conditions.New(client.Resources()).ResourceMatch(&resultDeployment, func(object k8s.Object) bool {}
Also, the teardown in the feature step and Finish in the main step didn't execute when this error happened.
The function I tried to run:
func TestDeployment(t *testing.T) {
deploymentFeat := features.New("Test").
Setup(func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context {
deployment := newDeployment()
<Logic>
return ctx
}).
Assess("Pods successfully deployed", func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context {
client, err := cfg.NewClient()
if err != nil {
t.Error("Failed to create new client", err)
}
resultDeployment := appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{Name: "deployment-test", Namespace: cfg.Namespace()},
}
if err = wait.For(conditions.New(client.Resources()).DeploymentConditionMatch(&resultDeployment, appsv1.DeploymentAvailable, corev1.ConditionTrue),
wait.WithTimeout(time.Minute*2)); err != nil {
t.Error("deployment not found", err)
}
if err := wait.For(conditions.New(client.Resources()).ResourceMatch(&resultDeployment, func(object k8s.Object) bool {
<Logic>
return true
}), wait.WithTimeout(time.Minute*4)); err != nil {
t.Error("error", err)
}
return context.WithValue(ctx, "deployment-test", &resultDeployment)
}).
Teardown(func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context {
client, err := cfg.NewClient()
if err != nil {
t.Error("failed to create new Client", err)
}
dep := ctx.Value("deployment-test").(*appsv1.Deployment)
if err := client.Resources().Delete(ctx, dep); err != nil {
t.Error("failed to delete deployment", err)
}
return ctx
}).Feature()
testenv.Test(t, deploymentFeat)
}
Also, the teardown in the feature step and Finish in the main step didn't execute when this error happened.
It does not look like any panic recovering is happening internally that would allow completion of teardown/Finish functions. Though I am not sure if it would be appropriate to execute teardown steps after a panic.
A goroutine occurs while using
wait.For(conditions.New(client.Resources()).ResourceMatch(&resultDeployment, func(object k8s.Object) bool {}
Also, the
teardown
in the feature step andFinish
in the main step didn't execute when this error happened.The function I tried to run:
Error: Uploaded here
Type: Bug
Version: v0.5
KinD version:
kind v0.11.1 go1.16.4 darwin/amd64
The text was updated successfully, but these errors were encountered: