You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2009/08/06 03:09:48 UTC
svn commit: r801485 -
/lucene/solr/trunk/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java
Author: yonik
Date: Thu Aug 6 01:09:47 2009
New Revision: 801485
URL: http://svn.apache.org/viewvc?rev=801485&view=rev
Log:
DirectUpdateHandlerTest used strings as int ids
Modified:
lucene/solr/trunk/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java
Modified: lucene/solr/trunk/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java?rev=801485&r1=801484&r2=801485&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java Thu Aug 6 01:09:47 2009
@@ -38,7 +38,7 @@
*/
public class DirectUpdateHandlerTest extends AbstractSolrTestCase {
- public String getSchemaFile() { return "schema.xml"; }
+ public String getSchemaFile() { return "schema12.xml"; }
public String getSolrConfigFile() { return "solrconfig.xml"; }
@@ -112,7 +112,7 @@
SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
assertQ("\"A\" should be found.", req
,"//*[@numFound='1']"
- ,"//result/doc[1]/int[@name='id'][.='A']"
+ ,"//result/doc[1]/str[@name='id'][.='A']"
);
}
@@ -134,8 +134,8 @@
SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
assertQ("\"A\" and \"B\" should be found.", req
,"//*[@numFound='2']"
- ,"//result/doc[1]/int[@name='id'][.='A']"
- ,"//result/doc[2]/int[@name='id'][.='B']"
+ ,"//result/doc[1]/str[@name='id'][.='A']"
+ ,"//result/doc[2]/str[@name='id'][.='B']"
);
// delete "B"
@@ -144,8 +144,8 @@
// search - "A","B" should be found.
assertQ("\"A\" and \"B\" should be found.", req
,"//*[@numFound='2']"
- ,"//result/doc[1]/int[@name='id'][.='A']"
- ,"//result/doc[2]/int[@name='id'][.='B']"
+ ,"//result/doc[1]/str[@name='id'][.='A']"
+ ,"//result/doc[2]/str[@name='id'][.='B']"
);
// commit
@@ -154,7 +154,7 @@
// search - "B" should not be found.
assertQ("\"B\" should not be found.", req
,"//*[@numFound='1']"
- ,"//result/doc[1]/int[@name='id'][.='A']"
+ ,"//result/doc[1]/str[@name='id'][.='A']"
);
}
@@ -181,7 +181,7 @@
SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
assertQ("\"B\" should not be found.", req
,"//*[@numFound='1']"
- ,"//result/doc[1]/int[@name='id'][.='A']"
+ ,"//result/doc[1]/str[@name='id'][.='A']"
);
// Add a doc after the rollback to make sure we can continue to add/delete documents
@@ -190,7 +190,7 @@
assertU(commit());
assertQ("\"ZZZ\" must be found.", req("q", "id:ZZZ")
,"//*[@numFound='1']"
- ,"//result/doc[1]/int[@name='id'][.='ZZZ']"
+ ,"//result/doc[1]/str[@name='id'][.='ZZZ']"
);
}
@@ -212,8 +212,8 @@
SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
assertQ("\"A\" and \"B\" should be found.", req
,"//*[@numFound='2']"
- ,"//result/doc[1]/int[@name='id'][.='A']"
- ,"//result/doc[2]/int[@name='id'][.='B']"
+ ,"//result/doc[1]/str[@name='id'][.='A']"
+ ,"//result/doc[2]/str[@name='id'][.='B']"
);
// delete "B"
@@ -222,8 +222,8 @@
// search - "A","B" should be found.
assertQ("\"A\" and \"B\" should be found.", req
,"//*[@numFound='2']"
- ,"//result/doc[1]/int[@name='id'][.='A']"
- ,"//result/doc[2]/int[@name='id'][.='B']"
+ ,"//result/doc[1]/str[@name='id'][.='A']"
+ ,"//result/doc[2]/str[@name='id'][.='B']"
);
// rollback "B"
@@ -233,8 +233,8 @@
// search - "B" should be found.
assertQ("\"B\" should be found.", req
,"//*[@numFound='2']"
- ,"//result/doc[1]/int[@name='id'][.='A']"
- ,"//result/doc[2]/int[@name='id'][.='B']"
+ ,"//result/doc[1]/str[@name='id'][.='A']"
+ ,"//result/doc[2]/str[@name='id'][.='B']"
);
// Add a doc after the rollback to make sure we can continue to add/delete documents
@@ -243,7 +243,7 @@
assertU(commit());
assertQ("\"ZZZ\" must be found.", req("q", "id:ZZZ")
,"//*[@numFound='1']"
- ,"//result/doc[1]/int[@name='id'][.='ZZZ']"
+ ,"//result/doc[1]/str[@name='id'][.='ZZZ']"
);
}