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

ut,multi net: Fix assertion in case of unexpected error #4747

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oshoval
Copy link
Contributor

@oshoval oshoval commented Sep 22, 2024

What this PR does and why is it needed

In case there is an unexpected error, for a test that should pass,
there will be a panic because the matcher expects non nil value.

panic: reflect: call of reflect.Value.Type on zero Value [recovered]
	panic: reflect: call of reflect.Value.Type on zero Value

Fix it to be explicit and also print the error to ease debug.

Which issue(s) this PR fixes

Fixes #

Special notes for reviewers

If desired i can cherry-pick it to #4732
to reduce one review, but it is not related to that PR.

How to verify it

Details to documentation updates

Description for the changelog

Does this PR introduce a user-facing change?


@oshoval oshoval requested a review from a team as a code owner September 22, 2024 11:54
@github-actions github-actions bot added the area/unit-testing Issues related to adding/updating unit tests label Sep 22, 2024
@oshoval
Copy link
Contributor Author

oshoval commented Sep 22, 2024

/cc @maiqueb @qinqon

In case there is an unexpected error, for a test that should pass,
there will be a panic because the matcher expects non nil value.

Fix it to be explicit and also print the error to ease debug.

Signed-off-by: Or Shoval <oshoval@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/unit-testing Issues related to adding/updating unit tests
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant