From 4a728ed9a6da5a5c53b75178cea02bdd6f679f02 Mon Sep 17 00:00:00 2001 From: tesshucom Date: Mon, 8 Jul 2019 05:44:03 +0900 Subject: [PATCH] Add and modify comments --- .../SearchServiceSpecialGenreTestCase.java | 57 ++++++++++--------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/airsonic-main/src/test/java/org/airsonic/player/service/search/SearchServiceSpecialGenreTestCase.java b/airsonic-main/src/test/java/org/airsonic/player/service/search/SearchServiceSpecialGenreTestCase.java index 799ea8b3..760d99a1 100644 --- a/airsonic-main/src/test/java/org/airsonic/player/service/search/SearchServiceSpecialGenreTestCase.java +++ b/airsonic-main/src/test/java/org/airsonic/player/service/search/SearchServiceSpecialGenreTestCase.java @@ -108,6 +108,11 @@ public class SearchServiceSpecialGenreTestCase { return musicFolders; } + /* + * A count to deliberately stagger the execution of populateDatabase. + * If populate Database is called from multiple methods almost simultaneously, + * it may not execute correctly. + */ private int count = 1; private synchronized void populateDatabase() { @@ -135,19 +140,18 @@ public class SearchServiceSpecialGenreTestCase { } } + /* + * There are 19 files + * in src/test/resources/MEDIAS/Search/SpecialGenre/ARTIST1/ALBUM_A. + * In FILE01 to FILE16, Special strings for Lucene syntax are stored + * as tag values ​​of Genre. + * + * Legacy can not search all these genres. + * (Strictly speaking, the genre field is not created at index creation.) + */ @Test public void testQueryEscapeRequires() { - /* - * There are 19 files - * in src/test/resources/MEDIAS/Search/SpecialGenre/ARTIST1/ALBUM_A. - * In FILE01 to FILE16, Special strings for Lucene syntax are stored - * as tag values ​​of Genre. - * - * Legacy can not search all these genres. - * (Strictly speaking, the genre field is not created at index creation.) - */ - List folders = getTestMusicFolders(); Function simpleStringCriteria = s -> @@ -211,13 +215,12 @@ public class SearchServiceSpecialGenreTestCase { } + /* + * Jaudiotagger applies special treatment to bracket (FILE17). + * + */ @Test public void testBrackets() { - - /* - * Jaudiotagger applies special treatment to bracket (FILE17). - * - */ List folders = getTestMusicFolders(); @@ -245,12 +248,12 @@ public class SearchServiceSpecialGenreTestCase { } + /* + * Jaudiotagger applies special treatment to numeric. (FILE18) + */ @Test public void testNumericMapping() { - /* - * Jaudiotagger applies special treatment to numeric. (FILE18) - */ List folders = getTestMusicFolders(); RandomSearchCriteria criteria = new RandomSearchCriteria(Integer.MAX_VALUE, // count @@ -269,18 +272,18 @@ public class SearchServiceSpecialGenreTestCase { } + /* + * Other special strings. (FILE19) + * + * {'“『【【】】[︴○◎@ $〒→+]FULL-WIDTHCæsar's + * + * Legacy stores with Analyze, + * so searchable characters are different. + * + */ @Test public void testOthers() { - /* - * Other special strings. (FILE19) - * - * {'“『【【】】[︴○◎@ $〒→+]FULL-WIDTHCæsar's - * - * Legacy stores with Analyze, - * so searchable characters are different. - * - */ List folders = getTestMusicFolders(); RandomSearchCriteria criteria = new RandomSearchCriteria(Integer.MAX_VALUE, // count