Skip to content

Upgrade test hangs if Skip is invoked in continual operation verification phase #1911

@cardil

Description

@cardil

Expected Behavior

Invoking t.Skip() should mark verification subtest as skipped, and tests should finish

Actual Behavior

Test execution hangs.

Steps to Reproduce the Problem

package upgrade_test

import (
	"testing"

	"knative.dev/pkg/test/upgrade"
)

func TestSuiteExecuteWithSkips(t *testing.T) {
	s := upgrade.Suite{
		Tests:         upgrade.Tests{
			Continual:     []upgrade.BackgroundOperation{
				upgrade.NewBackgroundVerification("Skipped",
					func(c upgrade.Context) {
						c.Log.Info("Setup")
					},
					func(c upgrade.Context) {
						c.Log.Warn("Skipping")
						c.T.Skip()
					},
				),
			},
		},
	}
	log, _ := newExampleZap()
	s.Execute(upgrade.Configuration{
		T:   t,
		Log: log,
	})
}

Additional Info

This is blocking knative/eventing#4519

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions