You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2018/11/27 15:50:05 UTC
lucene-solr:master: SOLR-5211: fix test
Repository: lucene-solr
Updated Branches:
refs/heads/master 6728f0c4f -> 1534bbe4a
SOLR-5211: fix test
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1534bbe4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1534bbe4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1534bbe4
Branch: refs/heads/master
Commit: 1534bbe4ae593521ba27c92495cf52c54be85fbf
Parents: 6728f0c
Author: David Smiley <ds...@apache.org>
Authored: Tue Nov 27 07:50:01 2018 -0800
Committer: David Smiley <ds...@apache.org>
Committed: Tue Nov 27 07:50:01 2018 -0800
----------------------------------------------------------------------
.../src/test/org/apache/solr/update/RootFieldTest.java | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1534bbe4/solr/core/src/test/org/apache/solr/update/RootFieldTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/RootFieldTest.java b/solr/core/src/test/org/apache/solr/update/RootFieldTest.java
index c9f6cfd..7c0ad2b 100644
--- a/solr/core/src/test/org/apache/solr/update/RootFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/update/RootFieldTest.java
@@ -17,8 +17,6 @@
package org.apache.solr.update;
-import java.util.List;
-
import org.apache.solr.SolrJettyTestBase;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
@@ -28,14 +26,12 @@ import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.common.params.CommonParams;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.hamcrest.CoreMatchers.is;
-@Ignore("pending SOLR-5211 moshe fixing")
public class RootFieldTest extends SolrJettyTestBase {
private static boolean useRootSchema;
private static final String MESSAGE = "Update handler should create and process _root_ field " +
@@ -51,8 +47,8 @@ public class RootFieldTest extends SolrJettyTestBase {
@BeforeClass
public static void beforeTest() throws Exception {
useRootSchema = random().nextBoolean();
- // schema.xml declares _root_ field while schema15.xml does not.
- String schema = useRootSchema ? "schema.xml" : "schema15.xml";
+ // schema15.xml declares _root_ field, while schema-rest.xml does not.
+ String schema = useRootSchema ? "schema15.xml" : "schema-rest.xml";
initCore("solrconfig.xml", schema);
}
@@ -96,7 +92,7 @@ public class RootFieldTest extends SolrJettyTestBase {
// Check updated field values
assertThat(foundDoc.getFieldValue( "id" ), is(docId));
- assertThat( ((List)foundDoc.getFieldValue( "name" )).get(0), is("updated doc"));
+ assertThat(foundDoc.getFieldValue( "name" ), is("updated doc"));
assertThat(MESSAGE, foundDoc.getFieldValue( "_root_" ), is(expectedRootValue));
}