testcontainers / testcontainers/testcontainers-java

GenericContainer fails to start when exposing ports on certain OSes

オープン
#1,978 コメント 13 件 リアクション 6 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

resolution/acknowledged
主要言語
Java
スター
8.7k
フォーク
1.9k
平均マージ
2日 17時間
マージ済み PR(30日)
9

説明

Simple test case in JUnit 4, Java 8:

import lombok.val;
import org.junit.Test;
import org.testcontainers.containers.GenericContainer;

public class BoomTest {
  @Test
  public void notBoom() {
    val container = new GenericContainer("mongo:4.2.0-bionic").withExposedPorts(27017);
    container.start();
    System.out.println("Hello world");
  }
}

Using testcontainers version 1.12.2 will fail, timing out on start, but only on certain systems: fresh Arch and Void linux systems will fail on this, fresh Debian seemingly is fine.

Downgrading to version 1.10.7 works

---- edited by @bsideup ----
So the problem appear to be caused by #1318 and has a downstream dependency https://github.com/docker-java/docker-java/issues/1259

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

GenericContainer("mongo:4.2.0-bionic").withExposedPorts(27017) を使用した BoomTest の inline reproduction から始め、報告された Arch、Void、Debian システムで Testcontainers 1.12.2 と 1.10.7 を比較します。#1318 と docker-java issue #1259 のコンテキストを読みます; 完了の条件は、影響を受けるシステムで exposed ports を使用してコンテナが確実に起動することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, java
領域
devops, testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。