test(messaging): Kafka 시험이 쓰는 중인 기동 스크립트를 실행하지 않는다 #50

Merged
donghyeon.kang merged 3 commits from claude/be-main-red3-kafka into main 2026-11-18 19:11:13 +00:00
3 changed files with 25 additions and 2 deletions
+1
View File
@@ -5,3 +5,4 @@
{"date": "2026-11-13", "test": "JettyAttemptDeadlineTest#aSlowDripExchangeIsAbortedAtTheAttemptDeadline", "category": "fixed-time", "first_run": "desktop ~/w2-reloc-logs/w2-reloc-a.log (main c7a18ec7, prCheck, 시작 부하 11~15)", "verdict": "desktop 1회 실패(1.68초, 상한 1.5초). PR 단계 test라 runner PR run에서도 날 수 있다", "quarantined_until": "", "fixed_by": ""}
{"date": "2026-11-13", "test": "MinioS3ManagedObjectProviderContractTest#initializationError", "category": "fixed-time", "first_run": "304", "verdict": "재현 안 됨(desktop 1코어 기아 3회 통과, 첫 createBucket 최대 1.94초/acquire 2초)", "quarantined_until": "", "fixed_by": ""}
{"date": "2026-11-13", "test": "MinioManagedObjectFaultTest#connectionCutProducesABoundedFailureAndRecoveryWithoutMutationReplay", "category": "fixed-time", "first_run": "310", "verdict": "desktop 1코어 기아 3회 중 3회 실패(첫 createBucket 3.2~3.8초/apiCallTimeout 2초)", "quarantined_until": "", "fixed_by": ""}
{"date": "2026-11-18", "test": "InboxRedeliveryIntegrationTest#initializationError", "category": "concurrency-order", "first_run": "330", "verdict": "runner 같은 날 3회 중 1회 실패(nightly 324·main 327 통과). Kafka 기동 반복문이 복사가 끝나기 전의 스크립트를 실행해 exit 126(testcontainers-java #11682). lane 반복은 돌리지 않았다. docker CLI 탐침으로 부하 아래 원래 반복문 100회 중 0회 실패, sleep 뺀 반복문 50회 중 42회 실패(모두 exit 126, Text file busy)", "quarantined_until": "", "fixed_by": ""}
@@ -91,7 +91,18 @@ class InboxRedeliveryIntegrationTest {
@BeforeAll
static void startInfrastructure() {
kafka = new KafkaContainer(System.getProperty("ca.test.image.kafka"));
// Testcontainers' own start command execs /tmp/testcontainers_start.sh as soon as the file
// exists, while the copy can still hold it open for writing: ETXTBSY, exit 126 (main run 330;
// testcontainers-java #11682, open, no fixed version). This one waits for the script's last
// line and lets bash read it instead of exec'ing it, so the race is gone. If a Testcontainers
// upgrade changes that line, the start times out instead of passing by luck.
kafka =
new KafkaContainer(System.getProperty("ca.test.image.kafka"))
.withCommand(
"sh",
"-c",
"while ! grep -qs '^/etc/kafka/docker/run' /tmp/testcontainers_start.sh;"
+ " do sleep 0.1; done; exec bash /tmp/testcontainers_start.sh");
postgres = new PostgreSQLContainer(System.getProperty("ca.test.image.postgres-16"));
kafka.start();
postgres.start();
@@ -70,9 +70,20 @@ class ApplicationRelayKafkaIntegrationTest {
@BeforeAll
static void startBroker() throws Exception {
// Testcontainers' own start command execs /tmp/testcontainers_start.sh as soon as the file
// exists, while the copy can still hold it open for writing: ETXTBSY, exit 126 (main run 330;
// testcontainers-java #11682, open, no fixed version). This one waits for the script's last
// line and lets bash read it instead of exec'ing it, so the race is gone. If a Testcontainers
// upgrade changes that line, the start times out instead of passing by luck.
kafka =
new KafkaContainer(
System.getProperty("relayLane.kafkaImage", System.getProperty("ca.test.image.kafka")));
System.getProperty(
"relayLane.kafkaImage", System.getProperty("ca.test.image.kafka")))
.withCommand(
"sh",
"-c",
"while ! grep -qs '^/etc/kafka/docker/run' /tmp/testcontainers_start.sh;"
+ " do sleep 0.1; done; exec bash /tmp/testcontainers_start.sh");
kafka.start();
Properties admin = new Properties();
admin.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, kafka.getBootstrapServers());