Fix Test Queries for limits

master
Randomnicode 5 years ago
parent bc0ef1ea27
commit 4b852c53e2
  1. 8
      airsonic-main/src/test/java/org/airsonic/player/service/MediaScannerServiceTestCase.java
  2. 2
      airsonic-main/src/test/java/org/airsonic/player/service/search/SearchServiceTestCase.java

@ -135,13 +135,13 @@ public class MediaScannerServiceTestCase {
System.out.println("--- List of all artists ---");
System.out.println("artistName#albumCount");
List<Artist> allArtists = artistDao.getAlphabetialArtists(0, 0, musicFolderDao.getAllMusicFolders());
List<Artist> allArtists = artistDao.getAlphabetialArtists(0, Integer.MAX_VALUE, musicFolderDao.getAllMusicFolders());
allArtists.forEach(artist -> System.out.println(artist.getName() + "#" + artist.getAlbumCount()));
System.out.println("--- *********************** ---");
System.out.println("--- List of all albums ---");
System.out.println("name#artist");
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, 0, true, true, musicFolderDao.getAllMusicFolders());
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, Integer.MAX_VALUE, true, true, musicFolderDao.getAllMusicFolders());
allAlbums.forEach(album -> System.out.println(album.getName() + "#" + album.getArtist()));
Assert.assertEquals(5, allAlbums.size());
System.out.println("--- *********************** ---");
@ -196,14 +196,14 @@ public class MediaScannerServiceTestCase {
folders.add(musicFolder);
// Test that the artist is correctly imported
List<Artist> allArtists = artistDao.getAlphabetialArtists(0, 0, folders);
List<Artist> allArtists = artistDao.getAlphabetialArtists(0, Integer.MAX_VALUE, folders);
Assert.assertEquals(1, allArtists.size());
Artist artist = allArtists.get(0);
Assert.assertEquals("TestArtist", artist.getName());
Assert.assertEquals(1, artist.getAlbumCount());
// Test that the album is correctly imported, along with its MusicBrainz release ID
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, 0, true, true, folders);
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, Integer.MAX_VALUE, true, true, folders);
Assert.assertEquals(1, allAlbums.size());
Album album = allAlbums.get(0);
Assert.assertEquals("TestAlbum", album.getName());

@ -235,7 +235,7 @@ public class SearchServiceTestCase extends AbstractAirsonicHomeTest {
/*
* Acquisition of maximum number(5).
*/
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, 0, true, true, allMusicFolders);
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, Integer.MAX_VALUE, true, true, allMusicFolders);
Assert.assertEquals("(26) Get all albums with Dao.", 5, allAlbums.size());
List<MediaFile> allRandomAlbums = searchService.getRandomAlbums(Integer.MAX_VALUE,
allMusicFolders);

Loading…
Cancel
Save