Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broker conformance tests using reconciler-test #4200

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mgencur
Copy link
Contributor

@mgencur mgencur commented Jan 3, 2025

Fixes a number of issues:

  • The previous conformance tests were calling t.Fatalf on a parent T which could fail the whole test suite like this:
    {Failed  === RUN   TestBrokerConsumer/3/No_upgrade_of_version
     testing.go:1576: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
    
  • The test namespace was always deleted for conformance tests, even in the event of failure. The debug info was often insufficient. The new conformance tests keep the namespace with its resources if the tests fail and also provide more info about events that were delivered or missed.
  • The verification steps were running sequentially, now they're running in parallel.

Proposed Changes

  • Use reconciler-test framework and re-implement TestBrokerConsumer from test/e2e/conformance/data_plane_conformance_test.go
  • Remove TestBrokerIngress completely as all the tests are covered elsewhere:

Release Note


Docs

@knative-prow knative-prow bot requested review from Leo6Leo and pierDipi January 3, 2025 07:21
@knative-prow knative-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 3, 2025
f.Setup("trigger transformer goes ready", trigger.IsReady(triggerTransformer))

f.Stable("Conformance").
ShouldNot("The Broker SHOULD NOT upgrade the CloudEvents version",
Copy link
Contributor Author

@mgencur mgencur Jan 3, 2025

Choose a reason for hiding this comment

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

I'm just not sure about using ShouldNot/Should/Must in this whole section. Any suggestions which ones to use?

Copy link
Member

Choose a reason for hiding this comment

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

the test should follow the spec language, however, the way we run the tests should and should not in practice are like must / must not as we don't "skip should / should not"

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.51%. Comparing base (db85e46) to head (22b1d10).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4200      +/-   ##
==========================================
- Coverage   45.53%   45.51%   -0.02%     
==========================================
  Files         270      270              
  Lines       19925    19925              
==========================================
- Hits         9072     9069       -3     
- Misses      10127    10129       +2     
- Partials      726      727       +1     

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

@mgencur
Copy link
Contributor Author

mgencur commented Jan 3, 2025

/test upgrade-tests

@mgencur
Copy link
Contributor Author

mgencur commented Jan 3, 2025

/retest-required

@mgencur
Copy link
Contributor Author

mgencur commented Jan 3, 2025

/test upgrade-tests

Copy link
Member

@pierDipi pierDipi 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 Jan 8, 2025
Copy link

knative-prow bot commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mgencur, pierDipi

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

The pull request process is described here

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2025
@mgencur
Copy link
Contributor Author

mgencur commented Jan 8, 2025

/retest-required

1 similar comment
@mgencur
Copy link
Contributor Author

mgencur commented Jan 9, 2025

/retest-required

@pierDipi
Copy link
Member

pierDipi commented Jan 9, 2025

   steps.go:47: sources.knative.dev/v1, Resource=kafkasources did not become ready, conversion webhook for sources.knative.dev/v1beta1, Kind=KafkaSource failed: Post "https://kafka-webhook-eventing.knative-eventing.svc:443/resource-conversion?timeout=30s": EOF

/retest-required

Copy link

knative-prow bot commented Jan 9, 2025

@mgencur: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
reconciler-tests_eventing-kafka-broker_main 22b1d10 link true /test reconciler-tests

Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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 lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants