티스토리 뷰
Java
[Java] Spring Boot / Gradle 빌드 시 Execution failed for task ':test'. 에러 해결
Jane Kwon 2022. 5. 24. 16:20반응형
테스트 사용도 하지 않는데 Test 쪽에서 빌드하다가 에러가 난다.
> Task :test
DomainRegistryApisApplicationTests > contextLoads() FAILED
java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException at ConstructorResolver.java:800
Caused by: org.springframework.beans.factory.BeanCreationException at ConstructorResolver.java:658
Caused by: org.springframework.beans.BeanInstantiationException at SimpleInstantiationStrategy.java:185
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException at DataSourceProperties.java:252
1 test completed, 1 failed
> Task :test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/ec2-user/app/jane-shop-apis/build/reports/tests/test/index.html
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 16s
9 actionable tasks: 7 executed, 2 up-to-date
> in jane-shop-apis directory
> Build file copy
pid check :
> not found application
> new application deploy
> JAR name: jane-shop-apis-0.0.1-SNAPSHOT.jar
단위 테스트가 작성되지 않았는데 빌드가 되면서 난 에러여서 application.yml 에서 아래 테스트 구문을 제거해주니 잘 빌드되었다.
tasks.withType<Test> {
useJUnitPlatform()
}
반응형
'Java' 카테고리의 다른 글
[Java] SSL 인증서 PKIX path validation failed 에러 해결 (0) | 2023.03.30 |
---|---|
[Java] Jackson json에 null 필드 제외하기 (0) | 2023.02.17 |
[Java] SchemaManagementException 에러 해결 (0) | 2022.05.11 |
[Java] RestTemplate에서 DELETE 메소드로 Body 보내기 (0) | 2022.04.14 |
[Java] The processing instruction target matching "[xX][mM][lL]" is not allowed. 에러 해결 (0) | 2022.04.14 |