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

Test refactoring: use "@JacksonTestFailureExpected" from jackson-core test-jar #4910

Merged

Conversation

cowtowncoder
Copy link
Member

So: convert existing "tofix" tests to use shared version of annotations.

@cowtowncoder
Copy link
Member Author

cc @JooHyukKim : second part of refactoring, to use shared definitions. Should be possible to do for other repos too. What is needed:

  • Add dependency in pom.xml:
    <dependency>
      <groupId>tools.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${jackson.version.core}</version>
      <classifier>tests</classifier>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
  • No need to add module dependency (yet) -- for some reason module metadata not included

But with that should be able to use:

  • tools.jackson.core.testutil.JacksonTestUtilBase as base class (or via static includes) -- like DatabindTestUtil does
  • tools.jackson.core.testutil.failure.JacksonTestFailureExpected annotation

to replace current in-project copies of functionality.

@cowtowncoder cowtowncoder merged commit b7ce302 into master Jan 16, 2025
6 checks passed
@cowtowncoder cowtowncoder deleted the tatu/3.0/use-shared-expect-fail-test-annotation branch January 16, 2025 02:44
@cowtowncoder
Copy link
Member Author

cc @JooHyukKim : second part of refactoring, to use shared definitions. Should be possible to do for other repos too. What is needed:

  • Add dependency in pom.xml:
    <dependency>
      <groupId>tools.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${jackson.version.core}</version>
      <classifier>tests</classifier>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
  • No need to add module dependency (yet) -- for some reason module metadata not included

But with that should be able to use:

  • tools.jackson.core.testutil.JacksonTestUtilBase as base class (or via static includes) -- like DatabindTestUtil does
  • tools.jackson.core.testutil.failure.JacksonTestFailureExpected annotation

to replace current in-project copies of functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant