-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Chapter 11] 331p, 일래스틱 빈스토크에서 애플리케이션 배포하기 문제 #46
Comments
안녕하세요. |
file:///C:/dev/intelJ-20231109/bootBlog/build/reports/tests/test/index.html 에 들어가 테스트 실패 이유를 찾아보았습니다. 알맞게 찾은건지 모르겠지만, 가장 상단 오류내용은 java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@1a14fdf0 testClass = study.blog.bootBlog.BootBlogApplicationTests, locations = [], classes = [study.blog.bootBlog.BootBlogApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@68fa0ba8, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@640f11a1, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@3f6db3fb, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@5286c33a, org.springframework.boot.test.context.SpringBootTestAnnotation@24d5151f], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] 이었습니다. 그리고 오류 내역 가장 하단에 있는 내용은 Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class 이었습니다. 검색해 보았을 때 AWS에서 작업 중 프로퍼티스에서 DB를 가져오지 못해서 그렇다는 내용을 보았습니다. 해당 오류에 관한 전체 오류 내역입니다. Task :test BootBlogApplicationTests > contextLoads() FAILED TokenProviderTest > validToken() : 유효한 토큰일 때에 유효성 검증에 성공한다. FAILED TokenProviderTest > validToken() : 만료된 토큰인 때에 유효성 검증에 실패한다. FAILED TokenProviderTest > getAuthentication() : 토큰 기반으로 인증 정보를 가져올 수 있다. FAILED TokenProviderTest > getUserId() : 토큰으로 유저 ID를 가져올 수 있다. FAILED TokenProviderTest > generateToken(): 유저 정보와 만료 기간을 전달해 토큰을 만들 수 있음 FAILED BlogApiControllerTest > deleteArticle: 블로그 글 삭제에 성공한다. FAILED BlogApiControllerTest > findArticle: 블로그 글 조회에 성공한다. FAILED BlogApiControllerTest > findAllArticles: 블로그 글 목록 조회에 성공한다 FAILED BlogApiControllerTest > addArticle: 블로그 글 추가에 성공한다. FAILED BlogApiControllerTest > deleteArticle: 블로그 글 수정에 성공! FAILED TokenApiControllerTest > createNewAccessToken : 새로운 액세스 토큰을 발급한다. FAILED 12 tests completed, 12 failed
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. FAILURE: Build failed with an exception.
BUILD FAILED in 15s Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] |
application.yml 에서 spring: security: 로 되어있던 것을 드라이버가 없다고 하여서 spring: datasource: security: 로 변경했더니 task > build > build 가 계속 로딩 상태로 run이 되고 있는데 해결이 된 상태인지 아닌지 모르겠습니다. |
혹시 전체 코드를 깃허브에 올려주실 수 있으신가요? 처음에 라이브러리를 다운로드 받기 때문에 로딩 상태가 지속될 수 있으나 끝나야 하는게 정상입니다. 올리실 때 google client-id, secret 내용이 포함되지 않게 주의해주시고 올려주시면 확인해보겠습니다. |
늦게 확인해서 죄송합니다 🙇 연휴동안 노트북을 가져가지 않아 이제 확인했네요 ㅠㅠ 저는 이렇게 수정하니 잘 되는 것을 확인했습니다. |
저는 프로젝트 시작할 때 DB를 H2로 하려다 오류가 나서 mariaDB로 해서 다 맞췄는데 H2로 바꿔야할까요 ㅠㅠ? |
테스트는 H2로 돌리는 것을 추천드립니다! 어느 에러가 나시는건가요? |
오랫동안 active한 comment가 안 달려서 일단 close 해두겠습니다. 추가적인 질문 있으시면 reopen 해주시거나 새롭게 이슈 등록 부탁드립니다. 감사합니다! |
Gradle 탭을 누르고 Tasks 에서 build를 실행하면 그전까지 잘 실행되었던 테스트가 다 실패가 되면서 build가 실패합니다.
혹시나 싶어 따로 테스트를 실행해보았을 때 그전까지 잘 실행 되었던 것들이 모두 실패함을 알 수 있었습니다.
내용에는 그래들 9.0과 호환이 되지 않는 기능들이 있다고 하는데 해결방법을 찾지 못하였습니다.
The text was updated successfully, but these errors were encountered: