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

GH-4544 Openrewrite changes to the test classes. #4545

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

JervenBolleman
Copy link
Contributor

A few reverts regarding pom changes.

GitHub issue resolved: #4544

Briefly describe the changes proposed in this PR:

Just seeing what openrewrite does regarding junit4 to junit5, as well as what they consider best practice.


PR Author Checklist (see the contributor guidelines for more details):

  • my pull request is self-contained
  • I've added tests for the changes I made
  • I've applied code formatting (you can use mvn process-resources to format from the command line)
  • I've squashed my commits where necessary
  • every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

@JervenBolleman JervenBolleman self-assigned this May 12, 2023
@JervenBolleman JervenBolleman added the 🛠️ tech debt code refactoring, deprecation, and other technical debt tasks label May 12, 2023
@abrokenjester abrokenjester linked an issue May 12, 2023 that may be closed by this pull request
@erikgb
Copy link
Contributor

erikgb commented May 17, 2023

The diff is huge! Would it be possible to split this change - to make it reviewable? Most of the changes seem to be related to improving Java access modifiers.

@JervenBolleman JervenBolleman force-pushed the GH-4544-junit5-with-openrewrite branch from 9879ee5 to a76d50d Compare May 19, 2023 10:37
@JervenBolleman
Copy link
Contributor Author

JervenBolleman commented May 19, 2023

I have been experimenting with openrewrite to see if I can make it not do this public access removal but have not yet succeeded.

Converting it to draft in the meantime, looks like it will be easier to rerun the rewrite than do the rebase.

@JervenBolleman JervenBolleman marked this pull request as draft May 19, 2023 11:05
Signed-off-by: Jerven Bolleman <jerven.bolleman@sib.swiss>
Signed-off-by: Jerven Bolleman <jerven.bolleman@sib.swiss>
@JervenBolleman JervenBolleman force-pushed the GH-4544-junit5-with-openrewrite branch from a76d50d to bb6a438 Compare May 22, 2023 06:35
@JervenBolleman
Copy link
Contributor Author

using

mvn -U org.openrewrite.maven:rewrite-maven-plugin:run
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-testing-frameworks:RELEASE
-Drewrite.activeRecipes=org.openrewrite.java.testing.junit5.AddMissingNested

and to check the diferences in java code.

git diff -- ../$(git status --porcelain|grep '^ M'|head -n 1|cut -b 4-)

if there is public to package method changes undo these with

sed -i -e 's|\tvoid |\tpublic void |g' ../$(git status --porcelain|grep '^ M'|head -n 1|cut -b 4-)
# check nothing else changed
git diff -- ../$(git status --porcelain|grep '^ M'|head -n 1|cut -b 4-)

then add to the commit

git add -- ../$(git status --porcelain|grep '^ M'|head -n 1|cut -b 4-)

Signed-off-by: Jerven Bolleman <jerven.bolleman@sib.swiss>
@JervenBolleman
Copy link
Contributor Author

@erikgb I think it is best to wait with this until #4592 is merged as it kinda depends on that working nicely first. But thanks for already having a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ tech debt code refactoring, deprecation, and other technical debt tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Experiment with openrewrite to finish the junit5 migration
2 participants