ZinnaChoi / Study-Management

온라인 스터디 관리 시스템: 부재 일정 캘린더, 토론 게시판 및 알림 기능 제공
8 stars 0 forks source link

[Fix Request] 스터디 controller test 수정 요청 #65

Closed ZinnaChoi closed 9 months ago

ZinnaChoi commented 9 months ago

안녕하세요 @MeMyself-And-I !

다음과 같이 studyControllerTest에서 몇 가지 에러가 발생합니다!

image

org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 2
 at org.springframework.dao.support.DataAccessUtils.nullableSingleResult([DataAccessUtils.java:193](command:_java.test.openStackTrace?%5B%22%5Ctat%20org.springframework.dao.support.DataAccessUtils.nullableSingleResult(DataAccessUtils.java%3A193)%22%2C%22Study-Management%22%5D))
 at org.springframework.jdbc.core.JdbcTemplate.queryForObject([JdbcTemplate.java:520](command:_java.test.openStackTrace?%5B%22%5Ctat%20org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java%3A520)%22%2C%22Study-Management%22%5D))
 at org.springframework.jdbc.core.JdbcTemplate.queryForObject([JdbcTemplate.java:526](command:_java.test.openStackTrace?%5B%22%5Ctat%20org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java%3A526)%22%2C%22Study-Management%22%5D))
 at mogakco.StudyManagement.controller.StudyControllerTest.getStudyIdById([StudyControllerTest.java:264](command:_java.test.openStackTrace?%5B%22%5Ctat%20mogakco.StudyManagement.controller.StudyControllerTest.getStudyIdById(StudyControllerTest.java%3A264)%22%2C%22Study-Management%22%5D))
 at mogakco.StudyManagement.controller.StudyControllerTest.deleteStudyInfoUpdate_AuthenticationFail([StudyControllerTest.java:258](command:_java.test.openStackTrace?%5B%22%5Ctat%20mogakco.StudyManagement.controller.StudyControllerTest.deleteStudyInfoUpdate_AuthenticationFail(StudyControllerTest.java%3A258)%22%2C%22Study-Management%22%5D))
 at java.base/java.util.ArrayList.forEach([ArrayList.java:1511](command:_java.test.openStackTrace?%5B%22%5Ctat%20java.base%2Fjava.util.ArrayList.forEach(ArrayList.java%3A1511)%22%2C%22Study-Management%22%5D))
 at java.base/java.util.ArrayList.forEach([ArrayList.java:1511](command:_java.test.openStackTrace?%5B%22%5Ctat%20java.base%2Fjava.util.ArrayList.forEach(ArrayList.java%3A1511)%22%2C%22Study-Management%22%5D))

에러 메세지를 보니 study가 study_info 테이블에 등록되어 있는 경우를 고려하지 않은 테스트 케이스 인것 같아요! 시간 나실 때 확인 부탁드립니다~!

MeMyself-And-I commented 9 months ago

이슈 작업 내역 https://github.com/ZinnaChoi/Study-Management/pull/68

ZinnaChoi commented 9 months ago

수정이 확인되어 close 처리하겠습니다~