Add @FeignTest annotation for Feign Layer
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #1449 @sharanggupta による — マージされずにクローズ
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
まず、既存の @WebMvcTest と @SpringBootTest の例を、issue で説明されている @AutoConfigureStubRunner のコンシューマー設定と比較します。@FeignTest が Feign クライアント向けに構成する必要があるものと、除外する必要がある本番 Bean を定義し、そのうえで、コンシューマーテストがアプリケーション全体を起動せずに Feign 抽象化を通じてリクエストを実行できることを検証します。
索引モデルが issue の本文から書いたものです。
説明
Hello!
I started to integrate Spring Cloud Contract into existing project.
No problems on producer side. Base test class annotated with @WebMvcTest, so only Web Layer getting configured and has same state as for production deployment. Services mocked, Web works, tests passed, stubs published
Issue comes on consumer side.
We are using Feign as client. So Preferable solution is to create test, inject FeignClient with same configuration, as for production deployment and perform http requests using using Feign abstraction.
Example from documentation:
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment=WebEnvironment.NONE)
@AutoConfigureStubRunner(ids = {"com.example:http-server-dsl:+:stubs:6565"},
stubsMode = StubRunnerProperties.StubsMode.LOCAL)
public class LoanApplicationServiceTests
This will work, but in services with complex configuration it is difficult to create such configuration (@SpringBootTest).
All properties must be set, production only beans must be mocked, etc. More over - there is no need for Feign tests to create all service, configuration and controller beans.
So existent of special annotation for Feign Client Layer Test (@FeignTest) will helps a lot and sounds reasonable.
But to create this annotation deep knowledge of all Feign related spring auto configurations required (web converters, ribbon, eureka, jackson, etc.)
It would be great, if you will able to implement this annotation.
Thanks in advance,
Yesman Maxim.
- 主要言語
- Java
- スター
- 1.3k
- フォーク
- 835
- 平均マージ
- 19時間 49分
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
spring-cloud/spring-cloud-openfeign のほかの issue
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
spring-cloud/spring-cloud-openfeign#1392 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
FeignClientsConfiguration$MicrometerConfiguration.class cannot be opened because it does not existオープンfeedback-provided
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
spring-cloud/spring-cloud-openfeign#1379 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
waiting-for-triage
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
spring-cloud/spring-cloud-openfeign#1344 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
waiting-for-triage
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
spring-cloud/spring-cloud-openfeign#1343 ·
メンテナーはふだん 1 日以内に返信
-
waiting-for-triage
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
spring-cloud/spring-cloud-openfeign#1340 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
spring-cloud/spring-cloud-openfeign の issue をすべて見る
似ている issue
-
status: waiting-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
spring-projects/spring-ai#7206 ·
メンテナーはふだん 2 日以内に返信
-
area/cli
難易度 2/5 半日 初心者へのやさしさ 78/100
quarkusio/quarkus#57623 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jhipster/prettier-java#1113 ·
メンテナーはふだん 2 日以内に返信
-
bug follow-up lane:backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Sanne/incus-spawn#1576 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Pasting code into a comment adds imports for the pasted code対応中かも @ravnskjaer が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
eclipse-jdt/eclipse.jdt.ui#3275 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信