From bd6094f71fb25d8db9eb7692c8e63d938e11effa Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 18 Jun 2026 00:30:10 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=B1=EC=97=94=EB=93=9C=20Docker=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=8B=A4=ED=8C=A8=EB=A1=9C=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=EA=B0=80=20=EB=A7=89=ED=9E=88=EB=8D=98=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=EB=A5=BC=20=EC=88=98=EC=A0=95=ED=95=9C=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 테스트 컴파일 오류(RsiThresholdCrossSignalTest)와 -DskipTests 한계를 해결해 StrategyConditionThresholdNormalizer가 실제 서버 이미지에 포함되도록 한다. Co-authored-by: Cursor --- backend/Dockerfile | 2 +- .../service/RsiThresholdCrossSignalTest.java | 19 +++++++++++++------ frontend/src/utils/strategyTimeframeSync.ts | 5 +++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index f7176d6..ff2f97c 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -22,7 +22,7 @@ RUN mvn -f backend/pom.xml dependency:go-offline -q 2>/dev/null || true # 소스 빌드 COPY backend/src ./backend/src -RUN mvn -f backend/pom.xml package -DskipTests -q +RUN mvn -f backend/pom.xml package -Dmaven.test.skip=true -q # ── 2단계: 실행 ────────────────────────────────────────────────────────────── FROM eclipse-temurin:21-jre-alpine AS production diff --git a/backend/src/test/java/com/goldenchart/service/RsiThresholdCrossSignalTest.java b/backend/src/test/java/com/goldenchart/service/RsiThresholdCrossSignalTest.java index 9f721f6..5ff32c7 100644 --- a/backend/src/test/java/com/goldenchart/service/RsiThresholdCrossSignalTest.java +++ b/backend/src/test/java/com/goldenchart/service/RsiThresholdCrossSignalTest.java @@ -132,11 +132,13 @@ class RsiThresholdCrossSignalTest { } private static BarSeries buildOscillatingSeries(int count) { - BaseBarSeriesBuilder builder = new BaseBarSeriesBuilder() + Duration period = Duration.ofMinutes(3); + BarSeries s = new BaseBarSeriesBuilder() .withName("test") - .withBarBuilderFactory(new TimeBarBuilderFactory(Duration.ofMinutes(3))) - .withNumFactory(DoubleNumFactory.getInstance()); - BarSeries s = builder.build(); + .withBarBuilderFactory(new TimeBarBuilderFactory()) + .withNumFactory(DoubleNumFactory.getInstance()) + .build(); + TimeBarBuilderFactory factory = new TimeBarBuilderFactory(); Instant t = Instant.parse("2024-01-01T00:00:00Z"); double price = 100; for (int i = 0; i < count; i++) { @@ -146,8 +148,13 @@ class RsiThresholdCrossSignalTest { double h = price + 1.5; double l = price - 1.5; double c = price; - s.addBar(t, o, h, l, c, 1000); - t = t.plus(Duration.ofMinutes(3)); + factory.createBarBuilder(s) + .timePeriod(period) + .endTime(t.plus(period)) + .openPrice(o).highPrice(h).lowPrice(l).closePrice(c) + .volume(1000) + .add(); + t = t.plus(period); } return s; } diff --git a/frontend/src/utils/strategyTimeframeSync.ts b/frontend/src/utils/strategyTimeframeSync.ts index c6b3eb4..849cc69 100644 --- a/frontend/src/utils/strategyTimeframeSync.ts +++ b/frontend/src/utils/strategyTimeframeSync.ts @@ -18,6 +18,7 @@ import { type EditorConditionState, } from './strategyConditionSerde'; import { getStartCandleTypes, normalizeStartCandleType } from './strategyStartNodes'; +import { normalizeLogicRootForPersistence } from './strategyConditionNormalize'; import type { LogicNode } from './strategyTypes'; import type { StrategyFlowLayoutStore } from './strategyEditorLayoutStorage'; @@ -211,8 +212,8 @@ export async function persistStrategyEditorState( id: strategyId, name, description, - buyCondition: encodedBuy, - sellCondition: encodedSell, + buyCondition: encodedBuy ? normalizeLogicRootForPersistence(encodedBuy) : encodedBuy, + sellCondition: encodedSell ? normalizeLogicRootForPersistence(encodedSell) : encodedSell, flowLayout, enabled: true, });