remove slow download host; only download zip file once for all tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@759061 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-03-27 08:44:33 +00:00
parent 198aa70b35
commit 0f17904f1e
1 changed files with 20 additions and 16 deletions

View File

@ -46,7 +46,9 @@ public class TestCompoundWordTokenFilter extends TestCase {
"http://dfn.dl.sourceforge.net/sourceforge/offo/offo-hyphenation.zip",
"http://surfnet.dl.sourceforge.net/sourceforge/offo/offo-hyphenation.zip",
"http://superb-west.dl.sourceforge.net/sourceforge/offo/offo-hyphenation.zip",
"http://superb-east.dl.sourceforge.net/sourceforge/offo/offo-hyphenation.zip"};
"http://voxel.dl.sourceforge.net/sourceforge/offo/offo-hyphenation.zip"};
// too slow:
//"http://superb-east.dl.sourceforge.net/sourceforge/offo/offo-hyphenation.zip"};
private byte[] patternsFileContent;
@ -166,6 +168,7 @@ public class TestCompoundWordTokenFilter extends TestCase {
}
private void getHyphenationPatternFileContents() {
if (patternsFileContent == null) {
try {
List urls = new LinkedList(Arrays.asList(locations));
Collections.shuffle(urls);
@ -185,6 +188,7 @@ public class TestCompoundWordTokenFilter extends TestCase {
// we swallow all exceptions - the user might have no internet connection
}
}
}
private Reader getHyphenationReader(String filename) throws Exception {
if (patternsFileContent == null) {