Skip to content

Cleanup created resources in channel conformance tests between features#7500

Merged
knative-prow[bot] merged 1 commit into
knative:mainfrom
creydr:cleanup-resources-in-channel-conformance-tests
Dec 8, 2023
Merged

Cleanup created resources in channel conformance tests between features#7500
knative-prow[bot] merged 1 commit into
knative:mainfrom
creydr:cleanup-resources-in-channel-conformance-tests

Conversation

@creydr
Copy link
Copy Markdown
Member

@creydr creydr commented Dec 7, 2023

The Channel conformance tests are running control- and data plane tests together in one test:

env.TestSet(ctx, t, channel.ControlPlaneConformance(channelName))
env.TestSet(ctx, t, channel.DataPlaneConformance(channelName))

As both run in the same namespace and create resources without cleaning them up, this can lead to issues. E.g. as currently both use the same channel for their tests (mychannelimpl). Then a control plane test creates a subscription for an existing channel. Later a data plane test runs and sends an event to the channel (mychannelimpl), but the channel still has a subscriber reference through the subscription from the control plane test. See for example knative-extensions/eventing-istio#158 (comment).

This PR addresses it and adds a teardown to the features to clean their resources up, after the feature was tested.

@knative-prow knative-prow Bot added the area/test-and-release Test infrastructure, tests or release label Dec 7, 2023
@knative-prow knative-prow Bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 7, 2023
@creydr
Copy link
Copy Markdown
Member Author

creydr commented Dec 7, 2023

@Cali0707 I think you might have run into the same in #7415 (comment)

/cc @matzew @Cali0707

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fa15023) 76.12% compared to head (fd439ed) 76.12%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7500   +/-   ##
=======================================
  Coverage   76.12%   76.12%           
=======================================
  Files         260      260           
  Lines       14467    14467           
=======================================
  Hits        11013    11013           
  Misses       2888     2888           
  Partials      566      566           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow knative-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2023
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Dec 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, matzew

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Should("Set the Channel status.deadLetterSinkURI if there is a valid spec.delivery.deadLetterSink defined",
readyChannelWithDLSHaveStatusUpdated(cName))

f.Teardown("cleanup created resources", f.DeleteResources)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@knative-prow knative-prow Bot merged commit 1e84b2e into knative:main Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants