diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 5add7788d18..3bf5bf7e949 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -669,6 +669,34 @@ Bug fixes to correctly respect deletions on reopened SegmentReaders. Factored out FieldCacheDocIdSet to be a top-level class. (Uwe Schindler, Simon Willnauer) +Build + +* LUCENE-3228: Stop downloading external javadoc package-list files: + + - Added package-list files for Oracle Java javadocs and JUnit javadocs to + Lucene/Solr subversion. + + - The Oracle Java javadocs package-list file is excluded from Lucene and + Solr source release packages. + + - Regardless of network connectivity, javadocs built from a subversion + checkout contain links to Oracle & JUnit javadocs. + + - Building javadocs from a source release package will download the Oracle + Java package-list file if it isn't already present. + + - When the Oracle Java package-list file is not present and download fails, + the javadocs targets will not fail the build, though an error will appear + in the build log. In this case, the built javadocs will not contain links + to Oracle Java javadocs. + + - Links from Solr javadocs to Lucene's javadocs are enabled. When building + a X.Y.Z-SNAPSHOT version, the links are to the most recently built nightly + Jenkins javadocs. When building a release version, links are to the + Lucene release javadocs for the same version. + + (Steve Rowe, hossman) + ======================= Lucene 3.5.0 ======================= Changes in backwards compatibility policy diff --git a/lucene/build.xml b/lucene/build.xml index 5abd666ab66..5efd7de1fc5 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -249,6 +249,7 @@ + @@ -377,6 +378,10 @@ value="${dist.dir}/lucene-${version}-src.tgz"/> + + + + @@ -567,6 +572,8 @@ title="${Name} ${version} Test Framework API"> + diff --git a/lucene/common-build.xml b/lucene/common-build.xml index e9c74e24bac..0154ad4ceda 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -94,10 +94,13 @@ + + + @@ -110,6 +113,9 @@ + + + @@ -524,8 +530,10 @@ - - + + + + @@ -539,7 +547,7 @@ This is very loud and obnoxious. abuse touch instead for a "quiet" mkdir --> - @@ -581,6 +589,10 @@ + + + + @@ -843,6 +855,7 @@ + @@ -859,7 +872,6 @@ use="true" failonerror="true" source="${ant.java.version}" - link="${javadoc.link}" windowtitle="${Name} ${version} API" doctitle="@{title}" stylesheetfile="${prettify.dir}/stylesheet+prettify.css" @@ -870,6 +882,7 @@ +
@@ -920,6 +933,12 @@ + + + + + @@ -1028,6 +1047,7 @@ + diff --git a/lucene/contrib/CHANGES.txt b/lucene/contrib/CHANGES.txt index 6cebcf1c66c..3371f9dd039 100644 --- a/lucene/contrib/CHANGES.txt +++ b/lucene/contrib/CHANGES.txt @@ -83,8 +83,6 @@ Bug Fixes ======================= Lucene 3.6.0 ================ -(No Changes) - Bug Fixes * LUCENE-3600: BlockJoinQuery now supports parent docs that have no @@ -217,7 +215,7 @@ New Features added support for simple numeric queries, such as , in contrib query parser (Vinicius Barros via Uwe Schindler) -Changes in runtime behavior: +Changes in runtime behavior * LUCENE-1768: StandardQueryConfigHandler now uses NumericFieldConfigListener to set a NumericConfig to its corresponding FieldConfig; diff --git a/lucene/src/java/org/apache/lucene/index/DirectoryReader.java b/lucene/src/java/org/apache/lucene/index/DirectoryReader.java index 96e9f66754f..d68c6d72516 100644 --- a/lucene/src/java/org/apache/lucene/index/DirectoryReader.java +++ b/lucene/src/java/org/apache/lucene/index/DirectoryReader.java @@ -662,7 +662,7 @@ class DirectoryReader extends IndexReader implements Cloneable { segmentInfos.setUserData(commitUserData); // Default deleter (for backwards compatibility) is // KeepOnlyLastCommitDeleter: - // nocommit: Decide what to do with InfoStream here? Use default or keep NO_OUTPUT? + // TODO: Decide what to do with InfoStream here? Use default or keep NO_OUTPUT? IndexFileDeleter deleter = new IndexFileDeleter(directory, deletionPolicy == null ? new KeepOnlyLastCommitDeletionPolicy() : deletionPolicy, segmentInfos, InfoStream.NO_OUTPUT, null); diff --git a/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java b/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java index efed32cc8a3..08c83c8f584 100644 --- a/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java +++ b/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java @@ -148,8 +148,12 @@ public abstract class LuceneTestCase extends Assert { public static final int TEST_ITER_MIN = Integer.parseInt(System.getProperty("tests.iter.min", Integer.toString(TEST_ITER))); /** Get the random seed for tests */ public static final String TEST_SEED = System.getProperty("tests.seed", "random"); - /** whether or not nightly tests should run */ + /** whether or not @nightly tests should run */ public static final boolean TEST_NIGHTLY = Boolean.parseBoolean(System.getProperty("tests.nightly", "false")); + /** whether or not @weekly tests should run */ + public static final boolean TEST_WEEKLY = Boolean.parseBoolean(System.getProperty("tests.weekly", "false")); + /** whether or not @slow tests should run */ + public static final boolean TEST_SLOW = Boolean.parseBoolean(System.getProperty("tests.slow", "false")); /** the line file used by LineFileDocs */ public static final String TEST_LINE_DOCS_FILE = System.getProperty("tests.linedocsfile", "europarl.lines.txt.gz"); /** whether or not to clean threads between test invocations: "false", "perMethod", "perClass" */ @@ -1349,6 +1353,22 @@ public abstract class LuceneTestCase extends Assert { @Retention(RetentionPolicy.RUNTIME) public @interface Nightly {} + /** + * Annotation for tests that should only be run during weekly builds + */ + @Documented + @Inherited + @Retention(RetentionPolicy.RUNTIME) + public @interface Weekly{} + + /** + * Annotation for tests that are slow and should be run only when specifically asked to run + */ + @Documented + @Inherited + @Retention(RetentionPolicy.RUNTIME) + public @interface Slow{} + /** * Annotation for test classes that should only use codecs that are not memory expensive (avoid SimpleText, MemoryCodec). */ diff --git a/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCaseRunner.java b/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCaseRunner.java index cbdd5d77151..322acd20daa 100644 --- a/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCaseRunner.java +++ b/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCaseRunner.java @@ -17,6 +17,7 @@ package org.apache.lucene.util; * limitations under the License. */ +import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; @@ -26,6 +27,8 @@ import java.util.List; import java.util.Random; import org.apache.lucene.util.LuceneTestCase.Nightly; +import org.apache.lucene.util.LuceneTestCase.Weekly; +import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.lucene.util.LuceneTestCase.UseNoMemoryExpensiveCodec; import org.junit.Ignore; import org.junit.Test; @@ -45,8 +48,11 @@ import static org.apache.lucene.util.LuceneTestCase.TEST_ITER_MIN; import static org.apache.lucene.util.LuceneTestCase.TEST_METHOD; import static org.apache.lucene.util.LuceneTestCase.TEST_SEED; import static org.apache.lucene.util.LuceneTestCase.TEST_NIGHTLY; +import static org.apache.lucene.util.LuceneTestCase.TEST_WEEKLY; +import static org.apache.lucene.util.LuceneTestCase.TEST_SLOW; import static org.apache.lucene.util.LuceneTestCase.VERBOSE; + /** optionally filters the tests to be run by TEST_METHOD */ public class LuceneTestCaseRunner extends BlockJUnit4ClassRunner { private List testMethods; @@ -89,27 +95,13 @@ public class LuceneTestCaseRunner extends BlockJUnit4ClassRunner { } if (TEST_NIGHTLY == false) { - if (getTestClass().getJavaClass().isAnnotationPresent(Nightly.class)) { - /* the test class is annotated with nightly, remove all methods */ - String className = getTestClass().getJavaClass().getSimpleName(); - System.err.println("NOTE: Ignoring nightly-only test class '" + className + "'"); - testMethods.clear(); - } else { - /* remove all nightly-only methods */ - for (int i = 0; i < testMethods.size(); i++) { - final FrameworkMethod m = testMethods.get(i); - if (m.getAnnotation(Nightly.class) != null) { - System.err.println("NOTE: Ignoring nightly-only test method '" + m.getName() + "'"); - testMethods.remove(i--); - } - } - } - /* dodge a possible "no-runnable methods" exception by adding a fake ignored test */ - if (testMethods.isEmpty()) { - try { - testMethods.add(new FrameworkMethod(LuceneTestCase.class.getMethod("alwaysIgnoredTestMethod"))); - } catch (Exception e) { throw new RuntimeException(e); } - } + removeAnnotatedTests(Nightly.class, "@nightly"); + } + if (TEST_WEEKLY == false) { + removeAnnotatedTests(Weekly.class, "@weekly"); + } + if (TEST_SLOW == false) { + removeAnnotatedTests(Slow.class, "@slow"); } // sort the test methods first before shuffling them, so that the shuffle is consistent // across different implementations that might order the methods different originally. @@ -122,7 +114,31 @@ public class LuceneTestCaseRunner extends BlockJUnit4ClassRunner { Collections.shuffle(testMethods, r); return testMethods; } - + + private void removeAnnotatedTests(Class annotation, String userFriendlyName) { + if (getTestClass().getJavaClass().isAnnotationPresent(annotation)) { + /* the test class is annotated with the annotation, remove all methods */ + String className = getTestClass().getJavaClass().getSimpleName(); + System.err.println("NOTE: Ignoring " + userFriendlyName + " test class '" + className + "'"); + testMethods.clear(); + } else { + /* remove all methods with the annotation*/ + for (int i = 0; i < testMethods.size(); i++) { + final FrameworkMethod m = testMethods.get(i); + if (m.getAnnotation(annotation) != null) { + System.err.println("NOTE: Ignoring " + userFriendlyName + " test method '" + m.getName() + "'"); + testMethods.remove(i--); + } + } + } + /* dodge a possible "no-runnable methods" exception by adding a fake ignored test */ + if (testMethods.isEmpty()) { + try { + testMethods.add(new FrameworkMethod(LuceneTestCase.class.getMethod("alwaysIgnoredTestMethod"))); + } catch (Exception e) { throw new RuntimeException(e); } + } + } + @Override protected void runChild(FrameworkMethod arg0, RunNotifier arg1) { if (VERBOSE) { diff --git a/lucene/src/test/org/apache/lucene/index/Test2BTerms.java b/lucene/src/test/org/apache/lucene/index/Test2BTerms.java index c474ddd8a67..41648a0fed8 100644 --- a/lucene/src/test/org/apache/lucene/index/Test2BTerms.java +++ b/lucene/src/test/org/apache/lucene/index/Test2BTerms.java @@ -41,11 +41,11 @@ import org.junit.Ignore; // disk (but, should run successfully). Best to run w/ // -Dtests.codec=Standard, and w/ plenty of RAM, eg: // -// ant compile-test +// ant test -Dtest.slow=true -Dtests.heapsize=8g // // java -server -Xmx8g -d64 -cp .:lib/junit-4.7.jar:./build/classes/test:./build/classes/test-framework:./build/classes/java -Dlucene.version=4.0-dev -Dtests.directory=MMapDirectory -DtempDir=build -ea org.junit.runner.JUnitCore org.apache.lucene.index.Test2BTerms // - +@LuceneTestCase.UseNoMemoryExpensiveCodec public class Test2BTerms extends LuceneTestCase { private final static int TOKEN_LEN = 10; @@ -140,13 +140,13 @@ public class Test2BTerms extends LuceneTestCase { } } - @Ignore("Takes ~4 hours to run on a fast machine!! And requires that you don't use PreFlex codec.") + @Slow public void test2BTerms() throws IOException { if ("Lucene3x".equals(Codec.getDefault().getName())) { - throw new RuntimeException("thist test cannot run with PreFlex codec"); + throw new RuntimeException("this test cannot run with PreFlex codec"); } - + System.out.println("Starting Test2B"); final long TERM_COUNT = ((long) Integer.MAX_VALUE) + 100000000; final int TERMS_PER_DOC = _TestUtil.nextInt(random, 100000, 1000000); diff --git a/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/FloatMagicTest.java b/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/FloatMagicTest.java index 1fd84102903..450c3b7f3b9 100644 --- a/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/FloatMagicTest.java +++ b/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/FloatMagicTest.java @@ -36,6 +36,7 @@ public class FloatMagicTest extends LuceneTestCase { for (int i = 0; i < floats.size(); i++) { int4[i] = FloatMagic.toSortable(floats.get(i)) & 0xffffffffL; + /* System.out.println( String.format("raw %8s sortable %8s %8s numutils %8s %s", Integer.toHexString(Float.floatToRawIntBits(floats.get(i))), @@ -43,6 +44,7 @@ public class FloatMagicTest extends LuceneTestCase { Integer.toHexString(FloatMagic.unsignedOrderedToFloatBits(FloatMagic.toSortable(floats.get(i)))), Integer.toHexString(NumericUtils.floatToSortableInt(floats.get(i))), floats.get(i))); + */ } // Sort and compare. Should be identical order. @@ -52,10 +54,12 @@ public class FloatMagicTest extends LuceneTestCase { backFromFixed.add(FloatMagic.fromSortable((int) int4[i])); } + /* for (int i = 0; i < int4.length; i++) { System.out.println( floats.get(i) + " " + FloatMagic.fromSortable((int) int4[i])); } + */ assertEquals(floats, backFromFixed); } diff --git a/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/TestSort.java b/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/TestSort.java index 7caa646be44..d350b0391f0 100644 --- a/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/TestSort.java +++ b/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/TestSort.java @@ -87,8 +87,8 @@ public class TestSort extends LuceneTestCase { File sorted = new File(tempDir, "sorted"); SortInfo sortInfo = sort.sort(unsorted, sorted); - System.out.println("Input size [MB]: " + unsorted.length() / (1024 * 1024)); - System.out.println(sortInfo); + //System.out.println("Input size [MB]: " + unsorted.length() / (1024 * 1024)); + //System.out.println(sortInfo); assertFilesIdentical(golden, sorted); return sortInfo; diff --git a/solr/build.xml b/solr/build.xml index 627880f2a91..46ca332a795 100644 --- a/solr/build.xml +++ b/solr/build.xml @@ -305,6 +305,10 @@ value="${package.dir}/${fullnamever}-src.tgz"/> + + + + - - @@ -456,6 +461,8 @@ + diff --git a/solr/common-build.xml b/solr/common-build.xml index 561c517b18e..38e60b09371 100644 --- a/solr/common-build.xml +++ b/solr/common-build.xml @@ -25,6 +25,9 @@ + + + @@ -212,13 +215,19 @@ - + + + + + + @@ -232,6 +241,26 @@ + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + +