You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/11/01 04:42:15 UTC

svn commit: r1195799 - in /lucene/dev/branches/lucene2621/lucene/src: test-framework/resources/META-INF/ test-framework/resources/META-INF/services/ test/org/apache/lucene/index/codecs/preflex/

Author: rmuir
Date: Tue Nov  1 03:42:14 2011
New Revision: 1195799

URL: http://svn.apache.org/viewvc?rev=1195799&view=rev
Log:
LUCENE-3490: test-framework SPI and test (could not add in first commit due to svn corrumption)

Added:
    lucene/dev/branches/lucene2621/lucene/src/test-framework/resources/META-INF/
    lucene/dev/branches/lucene2621/lucene/src/test-framework/resources/META-INF/services/
    lucene/dev/branches/lucene2621/lucene/src/test-framework/resources/META-INF/services/org.apache.lucene.index.codecs.spi.CodecProvider
    lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestImpersonation.java   (with props)

Added: lucene/dev/branches/lucene2621/lucene/src/test-framework/resources/META-INF/services/org.apache.lucene.index.codecs.spi.CodecProvider
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test-framework/resources/META-INF/services/org.apache.lucene.index.codecs.spi.CodecProvider?rev=1195799&view=auto
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test-framework/resources/META-INF/services/org.apache.lucene.index.codecs.spi.CodecProvider (added)
+++ lucene/dev/branches/lucene2621/lucene/src/test-framework/resources/META-INF/services/org.apache.lucene.index.codecs.spi.CodecProvider Tue Nov  1 03:42:14 2011
@@ -0,0 +1,16 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+org.apache.lucene.index.codecs.spi._TestCodecProvider

Added: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestImpersonation.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestImpersonation.java?rev=1195799&view=auto
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestImpersonation.java (added)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestImpersonation.java Tue Nov  1 03:42:14 2011
@@ -0,0 +1,34 @@
+package org.apache.lucene.index.codecs.preflex;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.lucene.index.codecs.Codec;
+import org.apache.lucene.index.codecs.preflexrw.PreFlexRWCodec;
+import org.apache.lucene.util.LuceneTestCase;
+
+/**
+ * Test that the SPI magic is returning "PreFlexRWCodec" for Lucene3x
+ * 
+ * @lucene.experimental
+ */
+public class TestImpersonation extends LuceneTestCase {
+  public void test() throws Exception {
+    Codec codec = Codec.forName("Lucene3x");
+    assertTrue(codec instanceof PreFlexRWCodec);
+  }
+}