forked from grpc/grpc-java
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing: Have GrpcCleanupRule extend ExternalResource
This allows using GrpcCleanupRule with JUnit 5 when combined with ExternalResourceSupport. We don't really lose anything important when running with JUnit 4 and this eases migration to JUnit 5. ExternalResource is now responsible for combining exceptions. after() cannot throw checked exceptions, so we must now wrap the InterruptedException. When used with JUnit 5 we are unable to detect the test failed; we accept that for now but it may be fair to create a new class for JUnit 5 to be used with `@RegisterExtension` that implements BeforeEachCallback and AfterTestExecutionCallback to restore the JUnit 4 behavior. See grpc#5331
- Loading branch information
Showing
2 changed files
with
54 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters