testcontainers / testcontainers/testcontainers-java
DockerComposeContainer withExposedService default wait strategy fails
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 8.7k
- フォーク
- 1.9k
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 9
説明
Hello again :)
Since I can't use container_name in my docker-compose.yml I have to dynamically set the configuration of a service via environment variables. To do so I call .getServiceHost() and .getServicePort() to retrieve the values. In order to be able to call them I need to add .withExposedService() to my DockerComposeContainer instance (that is already strange as I could just have ports or expose defined in my docker-compose.yml).
Using the default wait strategy fails because it tries to identify listening to some unknown port like 32824. As I see it's mapped either by ryuk or socat containers but the first one is not even at the same network all the services from the docker-compose.yml defined. As a workaround I just created a dummy anonymous class with an empty waitUntilReady implementation.
Why does it try to listen for the strange port not related to my service? Or why does the mapping between my service's port and the corresponding 'ambassador' one fail?
Thanks. Gonna appreciate any docs on that as well.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、レポートで説明されている DockerComposeContainer と withExposedService()、getServiceHost()、getServicePort() のエントリポイントから始め、報告された docker-compose.yml の設定を使ってデフォルトの待機戦略とそのポートマッピングを調査します。失敗を再現し、その戦略がサービスのマッピング済みポートを待機するかどうかを確認します。デフォルトの戦略が正しいポートを特定するか、必要な動作が文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- docker, docker-compose, java
- 領域
- devops, testing
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 32/100