@@ -45,8 +45,8 @@ class RecruitBoardQueryServiceTest extends IntegrationTestSupport {
4545 @ Autowired
4646 private RecruitBoardQueryService recruitBoardQueryService ;
4747
48- @ Autowired
49- private RecruitBoardDocumentService recruitBoardDocumentService ;
48+ // @Autowired
49+ // private RecruitBoardDocumentService recruitBoardDocumentService;
5050
5151 @ Autowired
5252 private RecruitBoardRepository recruitBoardRepository ;
@@ -285,40 +285,40 @@ void getAllByIds() {
285285 assertThat (all ).hasSize (3 );
286286 }
287287
288- @ DisplayName ("모집글을 elastic search index에 저장한다. (service)" )
289- @ Test
290- void saveRecruitBoardDocuments () {
291- //given
292- Center center = createCenter ("특별한 기관" );
293- centerRepository .save (center );
294-
295- Pageable pageable = getPageable ();
296- RecruitBoardSearchCondition condition = RecruitBoardSearchCondition .builder ()
297- .keyword ("저장" )
298- .pageable (pageable )
299- .build ();
300-
301- List <RecruitBoard > recruitBoards = new ArrayList <>();
302-
303- RecruitBoard board1 = createRecruitBoard ("저장 잘 되나요?" , center .getId ());
304- RecruitBoard savedBoard1 = recruitBoardRepository .save (board1 );
305- RecruitBoard board2 = createRecruitBoard ("저장해줘" , center .getId ());
306- RecruitBoard savedBoard2 = recruitBoardRepository .save (board2 );
307- recruitBoards .add (savedBoard1 );
308- recruitBoards .add (savedBoard2 );
309-
310- //when
311- recruitBoardDocumentService .saveRecruitBoardDocuments (recruitBoards );
312-
313- //then
314- Page <RecruitBoardWithCenterResponseDto > findBoard = recruitBoardDocumentService .getRecruitBoardBySearch (condition );
315-
316- assertThat (findBoard ).isNotNull ();
317- assertThat (findBoard .getTotalElements ()).isEqualTo (2 );
318-
319- recruitBoardRepository .deleteDocument (savedBoard1 .getId ());
320- recruitBoardRepository .deleteDocument (savedBoard2 .getId ());
321- }
288+ // @DisplayName("모집글을 elastic search index에 저장한다. (service)")
289+ // @Test
290+ // void saveRecruitBoardDocuments() {
291+ // //given
292+ // Center center = createCenter("특별한 기관");
293+ // centerRepository.save(center);
294+ //
295+ // Pageable pageable = getPageable();
296+ // RecruitBoardSearchCondition condition = RecruitBoardSearchCondition.builder()
297+ // .keyword("저장")
298+ // .pageable(pageable)
299+ // .build();
300+ //
301+ // List<RecruitBoard> recruitBoards = new ArrayList<>();
302+ //
303+ // RecruitBoard board1 = createRecruitBoard("저장 잘 되나요?", center.getId());
304+ // RecruitBoard savedBoard1 = recruitBoardRepository.save(board1);
305+ // RecruitBoard board2 = createRecruitBoard("저장해줘", center.getId());
306+ // RecruitBoard savedBoard2 = recruitBoardRepository.save(board2);
307+ // recruitBoards.add(savedBoard1);
308+ // recruitBoards.add(savedBoard2);
309+ //
310+ // //when
311+ // recruitBoardDocumentService.saveRecruitBoardDocuments(recruitBoards);
312+ //
313+ // //then
314+ // Page<RecruitBoardWithCenterResponseDto> findBoard = recruitBoardDocumentService.getRecruitBoardBySearch(condition);
315+ //
316+ // assertThat(findBoard).isNotNull();
317+ // assertThat(findBoard.getTotalElements()).isEqualTo(2);
318+ //
319+ // recruitBoardRepository.deleteDocument(savedBoard1.getId());
320+ // recruitBoardRepository.deleteDocument(savedBoard2.getId());
321+ // }
322322
323323 private Pageable getPageable () {
324324 Sort sort = Sort .by (Sort .Order .desc ("created_at" ));
0 commit comments