diff --git a/backend/src/main/java/shook/shook/song/application/InMemorySongsScheduler.java b/backend/src/main/java/shook/shook/song/application/InMemorySongsScheduler.java index 41355176..d0035607 100644 --- a/backend/src/main/java/shook/shook/song/application/InMemorySongsScheduler.java +++ b/backend/src/main/java/shook/shook/song/application/InMemorySongsScheduler.java @@ -40,8 +40,6 @@ private void detachSongs(final List songs) { songs.stream() .peek(entityManager::detach) .flatMap(song -> song.getKillingParts().stream()) - .peek(entityManager::detach) - .flatMap(killingPart -> killingPart.getKillingPartLikes().stream()) .forEach(entityManager::detach); } @@ -53,6 +51,5 @@ public void updateCachedSong() { .flatMap(song -> song.getKillingParts().stream()) .toList(); killingParts.forEach(entityManager::merge); - recreateCachedSong(); } } diff --git a/backend/src/test/java/shook/shook/song/domain/killingpart/repository/KillingPartRepositoryTest.java b/backend/src/test/java/shook/shook/song/domain/killingpart/repository/KillingPartRepositoryTest.java index 65b1b476..70e4db6f 100644 --- a/backend/src/test/java/shook/shook/song/domain/killingpart/repository/KillingPartRepositoryTest.java +++ b/backend/src/test/java/shook/shook/song/domain/killingpart/repository/KillingPartRepositoryTest.java @@ -6,7 +6,6 @@ import java.time.temporal.ChronoUnit; import java.util.List; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -19,7 +18,6 @@ import shook.shook.song.domain.repository.SongRepository; import shook.shook.support.UsingJpaTest; -@Disabled class KillingPartRepositoryTest extends UsingJpaTest { private static Song SAVED_SONG;