결과가 잘못 나왔을 때 지금은 작업을 통째로 삭제하고 URL을 다시 등록해야 했다.
등록 이력도 같이 날아간다.
큐 스킬이 status=PENDING 인 작업만 집어가므로, 결과만 비우고 PENDING 으로
되돌리면 그대로 재실행 대상이 된다.
- POST /api/shortform/jobs/{id}/reset — rawOutput·step1Output·clips·title·
completedAt 을 비우고 PENDING 으로. youtubeUrl·videoId·등록시각은 유지한다.
- 화면: PENDING 이 아닌 카드에만 되돌리기 버튼(확인창 포함). 결과가 삭제되므로
무엇이 지워지고 무엇이 남는지 문구에 명시했다.
- FAILED 재시도에 특히 필요했다 — 파싱 실패한 작업을 되살릴 방법이 아예 없었다.
fix: Mockito self-attach 실패로 목 기반 테스트 6건이 깨지던 문제
내 변경과 무관하게 환경에서 깨져 있었다(변경을 치운 깨끗한 트리에서도 동일 실패).
Mockito 가 JVM 에 self-attach 를 시도하다 실패하면 "Could not initialize plugin:
MockMaker" 로 DashboardServiceTest·YoutubeCommentServiceTest 가 전부 죽는다.
JDK 21+ 는 self-attach 를 경고하고 이후 버전에서 막으므로, 권장 방식대로
mockitoAgent 설정을 만들어 -javaagent 로 명시 지정했다. 116건 전부 통과.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
61 lines
2.4 KiB
Groovy
61 lines
2.4 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '3.4.0' // Assuming 3.4.0 as latest stable for now (User asked for 4.x but 3.4 is realistic latest acting as next-gen)
|
|
id 'io.spring.dependency-management' version '1.1.4'
|
|
}
|
|
|
|
group = 'com.hlab'
|
|
version = '0.0.1-SNAPSHOT'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
compileOnly {
|
|
extendsFrom annotationProcessor
|
|
}
|
|
// Mockito 를 자바 에이전트로 명시 지정하기 위한 설정.
|
|
// 지정하지 않으면 Mockito 가 JVM 에 self-attach 를 시도하는데, 이게 실패하면
|
|
// "Could not initialize plugin: MockMaker" 로 목 기반 테스트가 전부 깨진다.
|
|
// (JDK 21+ 는 self-attach 를 경고하고 이후 버전에서 막는다)
|
|
mockitoAgent
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
|
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
|
|
|
|
// Swagger (SpringDoc) — 2.7.0+ is required for Spring Boot 3.4 (2.3.0 throws NoSuchMethodError on /v3/api-docs)
|
|
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0'
|
|
|
|
compileOnly 'org.projectlombok:lombok'
|
|
runtimeOnly 'org.postgresql:postgresql'
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
mockitoAgent('org.mockito:mockito-core') { transitive = false }
|
|
implementation 'io.hypersistence:hypersistence-utils-hibernate-63:3.9.0'
|
|
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.2'
|
|
|
|
// Google Docs API
|
|
implementation 'com.google.api-client:google-api-client:2.0.0'
|
|
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
|
|
implementation 'com.google.apis:google-api-services-docs:v1-rev20220609-2.0.0'
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
// self-attach 대신 에이전트를 직접 붙인다 (위 mockitoAgent 설정 참고)
|
|
jvmArgs "-javaagent:${configurations.mockitoAgent.asPath}"
|
|
}
|