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

do GrpcServerRule exist migrated to Extensions for using in Junit5? #9088

Closed
juanjcal opened this issue Apr 18, 2022 · 3 comments
Closed

do GrpcServerRule exist migrated to Extensions for using in Junit5? #9088

juanjcal opened this issue Apr 18, 2022 · 3 comments
Labels

Comments

@juanjcal
Copy link

I have a task, where i have to migrate Junit4 test to Junit5 so, i can't use @rule anotation.
So my question is about exist any implementation about grpcServerRule in a Extension for can use GRPC in Junit5

Thank you so much

@sanjaypujare
Copy link
Contributor

sanjaypujare commented Apr 18, 2022

Based on this https://www.arhohuttunen.com/junit-5-migration/#rules it looks like you can try using the junit-jupiter-migrationsupport module to get support for ExternalResource which is what GrpcServerRule is based off of?

@ejona86
Copy link
Member

ejona86 commented Apr 19, 2022

I don't think gRPC will provide a more native form of test util for junit 5 than an External Resource.

This was discussed some in #5331 . GrpcServerRule is already an ExternalResource, so just use the ExternalResource support in junit 5. We will probably convert GrpcCleanupRule to extend ExternalResource for use in junit 5. The annotation approach in junit 5 seems counter to good design and I don't want to encourage environments where private fields are modified by impossible-to-discover code.

@ejona86
Copy link
Member

ejona86 commented May 3, 2022

Seems like this is resolved. If not, comment, and it can be reopened.

@ejona86 ejona86 closed this as completed May 3, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants