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

AVRO-3999 - Avoid warnings in Perl test suite #2953

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

jjatria
Copy link
Contributor

@jjatria jjatria commented Jun 11, 2024

AVRO-3999

What is the purpose of the change

The test suite generated several warnings which could easily be avoided. The changes in this PR make sure the test suite can complete without triggering these scenarios.

Specifically, this PR includes the following changes:

  • Do not exit a sub via next in xt/schema.t
  • Add a message to an error raised by Avro::BinaryDecoder which lead to a warning when trying to stringify an undefined value.

Ticket: https://issues.apache.org/jira/browse/AVRO-3999

Verifying this change

This change is already covered by existing tests

The change only touches the test suite, and does not change any of the tested behaviours, only the behaviour of the tests.

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

When the schema did not match in a call to Avro::BinaryDecoder::decode,
a Avro::Schema::Error::Mismatch error was thrown without a body. This
was generating a warning when trying to stringify an undefined value,
and resulted in the empty string being used as the error message, which
was not veryb informative.

This change adds a message which should solve both issues.
This silences a loud warning in xt/schema.t
@github-actions github-actions bot added the Perl label Jun 11, 2024
@jjatria jjatria changed the title Avoid warnings in Perl test suite AVRO-3999 - Avoid warnings in Perl test suite Jun 12, 2024
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @jjatria for picking this up

@martin-g martin-g merged commit 072b51f into apache:main Jun 12, 2024
6 checks passed
@martin-g
Copy link
Member

Thank you, @jjatria !

@jjatria jjatria deleted the perl-test-warnings branch June 12, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants