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

Enables JUnit Jupiter best practices #11643

Merged
merged 11 commits into from
Aug 20, 2024
Merged

Conversation

koppor
Copy link
Member

@koppor koppor commented Aug 18, 2024

This enables JUnit Jupiter best practices

Two main changes:

(Follow-up to #11642)

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@koppor koppor added the type: code-quality Issues related to code or architecture decisions label Aug 18, 2024
@koppor koppor changed the title Enables Enables JUnit Jupiter best practices Aug 18, 2024
@koppor koppor force-pushed the introduce-junit5-best-practices branch from 83d08f0 to 4227123 Compare August 18, 2024 11:28
@koppor
Copy link
Member Author

koppor commented Aug 18, 2024

Fetcher tests for quey transformation start to fail - need to investigate


org.jabref.logic.importer.fetcher.transformers.ArXivQueryTransformerTest
  Test convertYearRangeField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[2018]> but was: <Optional[all:2018]>

org.jabref.logic.importer.fetcher.transformers.CollectionOfComputerScienceBibliographiesQueryTransformerTest
  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[year:2018]> but was: <Optional[2018]>

org.jabref.logic.importer.fetcher.transformers.DBLPQueryTransformerTest
  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[2015]> but was: <Optional.empty>

  Test convertYearRangeField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[2012|2013|2014|2015]> but was: <Optional.empty>

org.jabref.logic.importer.fetcher.transformers.DefaultQueryTransformerTest
  Test convertYearRangeField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

org.jabref.logic.importer.fetcher.transformers.GVKQueryTransformerTest
  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[ver:2018]> but was: <Optional[pica.erj=2018]>

org.jabref.logic.importer.fetcher.transformers.JstorQueryTransformerTest
  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[sd:2018 AND ed:2018]> but was: <Optional[sd:2018 AND ed: 2018]>

org.jabref.logic.importer.fetcher.transformers.ScholarQueryTransformerTest
  Test convertYearRangeField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

@koppor koppor marked this pull request as draft August 18, 2024 11:37
@koppor
Copy link
Member Author

koppor commented Aug 18, 2024

OK, we forgot to add @Test annotations. The tests were never executed.

@koppor koppor mentioned this pull request Aug 18, 2024
6 tasks
@koppor koppor marked this pull request as ready for review August 18, 2024 22:51
@koppor koppor enabled auto-merge August 18, 2024 22:51
@koppor
Copy link
Member Author

koppor commented Aug 18, 2024

All should be good now. #11644 is kind of a pre-condition to get the OK checkmark for FetcherTests here, too.

@subhramit subhramit added the tests Related to tests label Aug 19, 2024
@koppor
Copy link
Member Author

koppor commented Aug 19, 2024

All should be good now. #11644 is kind of a pre-condition to get the OK checkmark for FetcherTests here, too.

We merged - could not fix one test. This test is also red here, all others green. Thus, this is good to go.

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 19, 2024
@subhramit subhramit mentioned this pull request Aug 20, 2024
6 tasks
Copy link
Contributor

github-actions bot commented Aug 20, 2024

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

@koppor koppor added this pull request to the merge queue Aug 20, 2024
Merged via the queue into main with commit 5ec3ef2 Aug 20, 2024
23 of 25 checks passed
@koppor koppor deleted the introduce-junit5-best-practices branch August 20, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers tests Related to tests type: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants