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, });