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

Expanded the Channel data plane conformance test #3394

Merged

Conversation

slinkydeveloper
Copy link
Contributor

@slinkydeveloper slinkydeveloper commented Jun 24, 2020

Signed-off-by: Francesco Guardiani [email protected]

Part of #1845

Proposed Changes

  • Now it tests the equality of the events received
  • Removed some assertions from recordevents because Added new matchers cloudevents/sdk-go#538 adds them to sdk-go
  • Increase verbosity in test failures (now it prints the stack)

Let's wait cloudevents/sdk-go#538 first.

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 24, 2020
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 24, 2020
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release labels Jun 24, 2020
Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v wire_gen.go)

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v wire_gen.go)

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v wire_gen.go)

for k := range event.Extensions() {
extKeys = append(extKeys, k)
}
extKeys = append(extKeys, eventingchannel.EventHistory)
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v wire_gen.go)

…equality of the received event

Signed-off-by: Francesco Guardiani <[email protected]>
Signed-off-by: Francesco Guardiani <[email protected]>
Signed-off-by: Francesco Guardiani <[email protected]>
Signed-off-by: Francesco Guardiani <[email protected]>
Signed-off-by: Francesco Guardiani <[email protected]>
Signed-off-by: Francesco Guardiani <[email protected]>
@slinkydeveloper
Copy link
Contributor Author

/retest

Signed-off-by: Francesco Guardiani <[email protected]>
Signed-off-by: Francesco Guardiani <[email protected]>
@slinkydeveloper
Copy link
Contributor Author

/retest

Signed-off-by: Francesco Guardiani <[email protected]>
Signed-off-by: Francesco Guardiani <[email protected]>
@slinkydeveloper
Copy link
Contributor Author

uhm on my machine it passes, not on CI

Signed-off-by: Francesco Guardiani <[email protected]>
@slinkydeveloper slinkydeveloper changed the title [WIP] Expanded the Channel data plane conformance test Expanded the Channel data plane conformance test Jun 25, 2020
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 25, 2020
@knative-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-eventing-integration-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-eventing-integration-tests:

test/e2e.TestParallel
test/e2e.TestParallel/Channel-messaging.knative.dev/v1beta1
test/e2e.TestParallel/InMemoryChannel-messaging.knative.dev/v1beta1

Signed-off-by: Francesco Guardiani <[email protected]>
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/channel/message_receiver.go 74.1% 73.6% -0.5

@slinkydeveloper
Copy link
Contributor Author

/check-cla

@lionelvillard
Copy link
Member

@googlebot rescan

@slinkydeveloper
Copy link
Contributor Author

It works!

@@ -136,7 +139,7 @@ func ParallelTestHelper(t *testing.T,
// verify the logger service receives the correct transformed event
eventTracker.AssertExact(1, recordevents.MatchEvent(
HasSource(eventSource),
recordevents.DataContains(tc.expected),
DataContains(tc.expected),
Copy link
Contributor

Choose a reason for hiding this comment

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

Not your doing, but I'm curious about the conformance test having an exactly once delivery semantics.

@@ -4,7 +4,7 @@ go 1.14

require (
contrib.go.opencensus.io/exporter/stackdriver v0.13.1 // indirect
github.com/cloudevents/sdk-go/v2 v2.0.1-0.20200608152019-2ab697c8fc0b
github.com/cloudevents/sdk-go/v2 v2.0.1-0.20200625144206-4e4657232c9e
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this include the 538 fix?

Copy link
Contributor

Choose a reason for hiding this comment

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

checked and it does :) Thanks!

@vaikas
Copy link
Contributor

vaikas commented Jun 26, 2020

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: slinkydeveloper, vaikas

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:
  • OWNERS [slinkydeveloper,vaikas]

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

@knative-prow-robot knative-prow-robot merged commit 00dabbc into knative:master Jun 26, 2020
vaikas pushed a commit to vaikas/eventing that referenced this pull request Jun 28, 2020
* Expanded the channel_message_modes_specversion_helper.go to test the equality of the received event

Signed-off-by: Francesco Guardiani <[email protected]>

* Linter thing

Signed-off-by: Francesco Guardiani <[email protected]>

* Fixed types in extensions

Signed-off-by: Francesco Guardiani <[email protected]>

* Temporary check

Signed-off-by: Francesco Guardiani <[email protected]>

* Matchers

Signed-off-by: Francesco Guardiani <[email protected]>

* Removed the wrong time defaulting

Signed-off-by: Francesco Guardiani <[email protected]>

* Removed time now

Signed-off-by: Francesco Guardiani <[email protected]>

* Removed time now

Signed-off-by: Francesco Guardiani <[email protected]>

* Print error stacktrace

Signed-off-by: Francesco Guardiani <[email protected]>

* More stacktrace print

Signed-off-by: Francesco Guardiani <[email protected]>

* Updated sdk-go to latest master

Signed-off-by: Francesco Guardiani <[email protected]>

* Now filterevents is happy

Signed-off-by: Francesco Guardiani <[email protected]>
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 cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants