-
Notifications
You must be signed in to change notification settings - Fork 0
feature: Kafka Producer - 결과 메시지 발송 기능 #77
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
base: develop
Are you sure you want to change the base?
Conversation
- spring-kafka 라이브러리 추가 - Config 정보, 클래스 추가 - 공통 메세지, 구체적인 메세지 Dto 생성 - Notificator: MessageProducer 호출하도록 대체 - MessageProducer: 메세지 발행 프로듀서
chore: application.yml 정리 및 카프카 정보 추가
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
테스트 코드 오류가 발생합니다.
verify는 일관성있는 검증을 위해 stub 한 동일한 매개변수로 사용해야 합니다.
예를 들어 아래와 같이 사용해야 테스트 코드가 정상 동작합니다.
verify(messageProducer, any()).produce(anyString(), any());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인 감사합니다. 기존 의도와 다르게 작성된 부분이 있어 코드 수정하였습니다.
추가로 KafkaTopicType enum 클래스 내 STOCK_RESULT_NOTI_TOPIC 필드의 값을 일부 수정했는데
테스트코드에 반영되어있지 않아서 발생하는 에러도 있어, 함께 수정했습니다.
|
2일에 pr push 해준 내용 까지 확인 완료 했습니다. 특이사항 없습니다. |
application.yml정리 및 카프카 정보 추가