File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/test/java/io/ejangs/docsa/domain/save/app Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2323import io .ejangs .docsa .global .exception .CustomException ;
2424import io .ejangs .docsa .global .exception .errorcode .DatabaseErrorCode ;
2525import io .ejangs .docsa .global .exception .errorcode .SaveErrorCode ;
26+ import jakarta .persistence .EntityManager ;
2627import java .time .LocalDateTime ;
2728import java .util .List ;
2829import java .util .Map ;
@@ -61,6 +62,9 @@ class SaveServiceIntegrationTest {
6162 @ Autowired
6263 private CommitRepository commitRepository ;
6364
65+ @ Autowired
66+ private EntityManager em ;
67+
6468 @ MockitoBean
6569 private SaveContentRepository saveContentRepository ;
6670
@@ -126,6 +130,8 @@ void updateSave_fails_whenMongoSaveFails_thenMysqlDeleted() throws Exception {
126130 .hasMessageContaining (DatabaseErrorCode .DATABASE_ERROR .getMessage ());
127131
128132 // then
133+ em .clear ();
134+
129135 Save after = saveRepository .findById (save .getId ()).orElse (null );
130136 assertThat (after ).isNotNull ();
131137 assertThat (after .getUpdatedAt ()).isEqualTo (beforeUpdatedAt );
You can’t perform that action at this time.
0 commit comments