Remove internal-only methods from testing package
- Vorherrschende Sprache
- Java
- Sterne
- 12.1k
- Forks
- 4k
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 37
Beschreibung
As mentioned in comments in #3099, there are some issues and limitation to the current unit test tools:
- It's hard to test a user-defined generic interceptor.
- People are abusing `NoopClientCall`, using it as an alternative of `mock(ClientCall.class)`, which is as bad as a mock.
- `TestMethodDescriptors.noopMarshaller` does not gain much benefit. It violates the interface's contract, it's equivalent to a `mock(Marshaller.class)`, and it does not work in InProcess transport or interop test.
Beitragsleitfaden
Rechercherichtung
Read the testing package's uses of NoopClientCall and TestMethodDescriptors.noopMarshaller, along with the discussion in #3099. Identify the internal-only helpers covered by the issue and their affected callers; done means those helpers no longer encourage the listed testing patterns without breaking the testing tools.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- grpc, java
- Bereich
- testing
- Issue-Typ
- Refactoring
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100