lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [02/50] lucene-solr:feature/autoscaling_72: LUCENE-7981 - CTB should check that CR is not null
Date Thu, 05 Oct 2017 11:56:23 GMT
LUCENE-7981 - CTB should check that CR is not null


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/97f246b4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/97f246b4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/97f246b4

Branch: refs/heads/feature/autoscaling_72
Commit: 97f246b4ba3f77f87751a374c587a2c84d3406ab
Parents: f9f6d3a
Author: Tommaso Teofili <tommaso@apache.org>
Authored: Fri Sep 29 15:34:43 2017 +0200
Committer: Tommaso Teofili <tommaso@apache.org>
Committed: Fri Sep 29 15:34:52 2017 +0200

----------------------------------------------------------------------
 .../org/apache/lucene/classification/ClassificationTestBase.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/97f246b4/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java
----------------------------------------------------------------------
diff --git a/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java
b/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java
index 6c8f7fd..b3220b0 100644
--- a/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java
+++ b/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java
@@ -88,6 +88,7 @@ public abstract class ClassificationTestBase<T> extends LuceneTestCase
{
 
   protected ClassificationResult<T> checkCorrectClassification(Classifier<T>
classifier, String inputDoc, T expectedResult) throws Exception {
     ClassificationResult<T> classificationResult = classifier.assignClass(inputDoc);
+    assertNotNull(classificationResult);
     T assignedClass = classificationResult.getAssignedClass();
     assertNotNull(assignedClass);
     assertEquals("got an assigned class of " + assignedClass, expectedResult instanceof BytesRef
? ((BytesRef) expectedResult).utf8ToString() : expectedResult, assignedClass instanceof BytesRef
? ((BytesRef) assignedClass).utf8ToString() : assignedClass);


Mime
View raw message