From 5093193cb5f2dbd8a5c8f7d3bd82332052dbe7c9 Mon Sep 17 00:00:00 2001 From: donghyeon-ka Date: Tue, 29 Sep 2026 14:54:06 +0900 Subject: [PATCH] =?UTF-8?q?review-followup=20Wave=203=20=EB=9D=BC=EC=9A=B4?= =?UTF-8?q?=EB=93=9C=203(P28=C2=B7P29):=20fileserver=20use=20case=C2=B7fil?= =?UTF-8?q?e:*=20=EA=B6=8C=ED=95=9C,=20=EB=B3=B4=EC=95=88=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20primitive=20=EA=B3=B5=EC=9A=A9=ED=99=94,=20jvm-test?= =?UTF-8?q?-suite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 결정 32: fileserver transport 연산 21개를 `port.in` use case로, 쓰기·읽기에 `file:*` 권한(소유자·tenant 정책은 유지), inbound 서비스 이름 `*UseCase`, port 구현 이름 `` 규칙(S2-#13b, 24개) - 디렉터리 descriptor 파일 primitive를 `adapter:outbound:support`로(S4-lead-2 일부 — fileserver는 번역만), persistence-fileserver를 scan·클래스별 조건 대신 명시적 `@Bean` 설정으로(S2-#8a 일부), `FileVerifier`를 adapter로 - 호출자 0인 `poster.image-attached` 이벤트 삭제, SES SDK client를 레지스트리 종료 때 close, fileserver migration V1–V5 고정 - P29: auxiliary 레인 → Gradle `jvm-test-suite`(BUILD-O3-5, build-logic 16,768 → 5,851줄), redis-sdk가 runtime을 api로(P22-new-3) - 통합: JPA API surface 기준선 재승인(이름 규칙 변경), migration lane에 V19 반영, messaging 통합 테스트가 jar 안 migration 목록 조회(ORCH-new-5) - P28·P29 에이전트가 세션 재시작으로 중단 — 커밋된 것만 합치고 결과 파일은 오케스트레이터가 확정, S6-#10a는 P30으로 검증: ./gradlew ci verifyDependencyLocks --warning-mode=fail(714 task) · mainCheck architectureCheck verifyPublicPathSnapshot :app-bootstrap:verifyEnvKeys configContractCheck · :app-bootstrap:integrationTest :sample-portfolio:integrationTest :sample-portfolio:systemTest integrationCheck · -p build-logic test · -p optional-platforms ci · releaseCheck qualificationBootJar 통과 Co-Authored-By: Claude Opus 5.5 (1M context) --- messaging/messaging-kafka/build.gradle | 16 ++++++-- .../build.gradle | 15 ++++++-- .../messaging/outbox/OutboxPostgresIT.java | 38 ++++++++++++++++--- .../build.gradle | 15 ++++++-- 4 files changed, 66 insertions(+), 18 deletions(-) diff --git a/messaging/messaging-kafka/build.gradle b/messaging/messaging-kafka/build.gradle index 8f28164..00c9892 100644 --- a/messaging/messaging-kafka/build.gradle +++ b/messaging/messaging-kafka/build.gradle @@ -1,6 +1,5 @@ plugins { id 'java-test-fixtures' - id 'ca.auxiliary-source-set' id 'ca.platform-module' id 'me.champeau.jmh' } @@ -10,11 +9,20 @@ jmh { includeTests = true } -auxiliarySourceSets { - sourceSet('integrationTest') { - compilesAgainst 'main', 'testFixtures' +testing { + suites { + integrationTest(JvmTestSuite) { + dependencies { + implementation project() + implementation testFixtures(project()) + } + } } } +configurations { + integrationTestImplementation.extendsFrom testImplementation + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly +} dependencies { // No spring-kafka. It was declared here and imported by nothing: this adapter drives the plain diff --git a/messaging/messaging-reliability-jdbc-postgresql/build.gradle b/messaging/messaging-reliability-jdbc-postgresql/build.gradle index cfa5217..f549b2d 100644 --- a/messaging/messaging-reliability-jdbc-postgresql/build.gradle +++ b/messaging/messaging-reliability-jdbc-postgresql/build.gradle @@ -1,13 +1,20 @@ plugins { - id 'ca.auxiliary-source-set' id 'ca.platform-module' } -auxiliarySourceSets { - sourceSet('integrationTest') { - compilesAgainst 'main' +testing { + suites { + integrationTest(JvmTestSuite) { + dependencies { + implementation project() + } + } } } +configurations { + integrationTestImplementation.extendsFrom testImplementation + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly +} // The relational implementations of the reliability ports: the outbox repository, the inbox // repository and the destructive-operation journal. Spring JDBC for the transaction join, and SQL diff --git a/messaging/messaging-reliability-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/outbox/OutboxPostgresIT.java b/messaging/messaging-reliability-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/outbox/OutboxPostgresIT.java index f3f1d2a..16becff 100644 --- a/messaging/messaging-reliability-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/outbox/OutboxPostgresIT.java +++ b/messaging/messaging-reliability-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/outbox/OutboxPostgresIT.java @@ -290,14 +290,31 @@ class OutboxPostgresIT { if (directory == null) { throw new IOException("the messaging migrations are missing from the classpath"); } - java.io.File[] files = - new java.io.File(java.net.URI.create(directory.toString())) - .listFiles((dir, name) -> name.endsWith(".sql")); - if (files == null || files.length == 0) { + // The migrations may sit in a directory or, when the suite runs against the main jar, inside + // it; a jar URL is not a file URI, so list through a filesystem that understands either. + java.net.URI uri; + try { + uri = directory.toURI(); + } catch (java.net.URISyntaxException malformed) { + throw new IOException(malformed); + } + java.util.List names; + if ("jar".equals(uri.getScheme())) { + try (java.nio.file.FileSystem jar = + java.nio.file.FileSystems.newFileSystem(uri, java.util.Map.of()); + java.util.stream.Stream listed = + java.nio.file.Files.list(jar.getPath("db/migration/messaging"))) { + names = sqlNames(listed); + } + } else { + try (java.util.stream.Stream listed = + java.nio.file.Files.list(java.nio.file.Path.of(uri))) { + names = sqlNames(listed); + } + } + if (names.isEmpty()) { throw new IOException("no migration applied; the schema under test would be empty"); } - java.util.List names = - java.util.Arrays.stream(files).map(java.io.File::getName).sorted().toList(); java.util.List statements = new java.util.ArrayList<>(); for (String name : names) { statements.add(migration(name)); @@ -305,6 +322,15 @@ class OutboxPostgresIT { return statements; } + private static java.util.List sqlNames( + java.util.stream.Stream listed) { + return listed + .map(path -> path.getFileName().toString()) + .filter(name -> name.endsWith(".sql")) + .sorted() + .toList(); + } + private int countWhere(String predicate) { try (Connection connection = dataSource.getConnection(); Statement statement = connection.createStatement(); diff --git a/messaging/messaging-spring-boot-starter/build.gradle b/messaging/messaging-spring-boot-starter/build.gradle index 7f3f781..efed4b9 100644 --- a/messaging/messaging-spring-boot-starter/build.gradle +++ b/messaging/messaging-spring-boot-starter/build.gradle @@ -1,5 +1,4 @@ plugins { - id 'ca.auxiliary-source-set' id 'ca.platform-module' id 'ca.spring-config' } @@ -9,11 +8,19 @@ plugins { // `api` is the types that genuinely appear in this module's public signatures; everything else is // `implementation`. Broker transports live in capability starters (messaging-spring-boot-starter-kafka), // so this starter's compile classpath carries no broker SDK. -auxiliarySourceSets { - sourceSet('integrationTest') { - compilesAgainst 'main' +testing { + suites { + integrationTest(JvmTestSuite) { + dependencies { + implementation project() + } + } } } +configurations { + integrationTestImplementation.extendsFrom testImplementation + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly +} dependencies { // Types an adopter writes against: envelopes, destinations, publish results, profiles, ports.