Open
Conversation
- spring-kafka 라이브러리 추가 - Config 정보, 클래스 추가 - 공통 메세지, 구체적인 메세지 Dto 생성 - Notificator: MessageProducer 호출하도록 대체 - MessageProducer: 메세지 발행 프로듀서
chore: application.yml 정리 및 카프카 정보 추가
2 tasks
yunki12
reviewed
Sep 27, 2024
src/test/java/com/devspacehub/ast/kafka/producer/MessageProducerIntegrationTest.java
Outdated
Show resolved
Hide resolved
|
|
||
| notificator.sendStockResultMessage(given); | ||
|
|
||
| verify(messageProducer, only()).produce("Stock Result Notification_TEST", given); |
Contributor
There was a problem hiding this comment.
테스트 코드 오류가 발생합니다.
verify는 일관성있는 검증을 위해 stub 한 동일한 매개변수로 사용해야 합니다.
예를 들어 아래와 같이 사용해야 테스트 코드가 정상 동작합니다.
verify(messageProducer, any()).produce(anyString(), any());
Contributor
Author
There was a problem hiding this comment.
확인 감사합니다. 기존 의도와 다르게 작성된 부분이 있어 코드 수정하였습니다.
추가로 KafkaTopicType enum 클래스 내 STOCK_RESULT_NOTI_TOPIC 필드의 값을 일부 수정했는데
테스트코드에 반영되어있지 않아서 발생하는 에러도 있어, 함께 수정했습니다.
Contributor
|
2일에 pr push 해준 내용 까지 확인 완료 했습니다. 특이사항 없습니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
application.yml정리 및 카프카 정보 추가