From 32ed46e55ee9b44752a8c74d49d2259c66f1f301 Mon Sep 17 00:00:00 2001 From: Michael Sabin Date: Sat, 15 Sep 2018 18:39:52 -0700 Subject: [PATCH] Fix test failure on Windows Media directories are added to the test database with the string essentially generated by this code: new File(MusicFolderTestData.resolveMusicFolderPath()).getPath() The directories are then queried by the string generated by this code: MusicFolderTestData.resolveMusicFolderPath() On Windows the strings are not identical. MusicFolderTestData.resolveMusicFolderPath() is prefixed by an extra slash that is removed when wrapped by a File() Signed-off-by: Michael Sabin --- .../airsonic/player/service/MediaScannerServiceTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airsonic-main/src/test/java/org/airsonic/player/service/MediaScannerServiceTestCase.java b/airsonic-main/src/test/java/org/airsonic/player/service/MediaScannerServiceTestCase.java index 65c129d3..46a487a0 100644 --- a/airsonic-main/src/test/java/org/airsonic/player/service/MediaScannerServiceTestCase.java +++ b/airsonic-main/src/test/java/org/airsonic/player/service/MediaScannerServiceTestCase.java @@ -125,10 +125,10 @@ public class MediaScannerServiceTestCase { // Music Folder Music must have 3 children - List listeMusicChildren = mediaFileDao.getChildrenOf(MusicFolderTestData.resolveMusicFolderPath()); + List listeMusicChildren = mediaFileDao.getChildrenOf(new File(MusicFolderTestData.resolveMusicFolderPath()).getPath()); Assert.assertEquals(3, listeMusicChildren.size()); // Music Folder Music2 must have 1 children - List listeMusic2Children = mediaFileDao.getChildrenOf(MusicFolderTestData.resolveMusic2FolderPath()); + List listeMusic2Children = mediaFileDao.getChildrenOf(new File(MusicFolderTestData.resolveMusic2FolderPath()).getPath()); Assert.assertEquals(1, listeMusic2Children.size()); System.out.println("--- List of all artists ---");