File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,8 @@ class ProcessJobTest {
272272 aiCommentService .processJob (job );
273273
274274 // then
275- assertThat (job .getStatus ()).isEqualTo (AiCommentJobStatus .DONE );
275+ AiCommentJob savedJob = aiCommentJobRepository .findById (job .getId ()).orElseThrow ();
276+ assertThat (savedJob .getStatus ()).isEqualTo (AiCommentJobStatus .DONE );
276277
277278 List <Comment > comments = commentRepository .findAll ();
278279 assertThat (comments ).hasSize (1 );
@@ -302,7 +303,8 @@ class ProcessJobTest {
302303 aiCommentService .processJob (job );
303304
304305 // then
305- assertThat (job .getStatus ()).isEqualTo (AiCommentJobStatus .FAILED );
306+ AiCommentJob savedJob = aiCommentJobRepository .findById (job .getId ()).orElseThrow ();
307+ assertThat (savedJob .getStatus ()).isEqualTo (AiCommentJobStatus .FAILED );
306308 assertThat (commentRepository .findAll ()).isEmpty ();
307309 }
308310 }
You can’t perform that action at this time.
0 commit comments