lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jim...@apache.org
Subject [lucene-solr] branch master updated: LUCENE-8984: Fix ut by cleaning up resources after test
Date Wed, 25 Sep 2019 10:44:37 GMT
This is an automated email from the ASF dual-hosted git repository.

jimczi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new a333b6d  LUCENE-8984: Fix ut by cleaning up resources after test
a333b6d is described below

commit a333b6dee3d2cbd157fea250873b900bde880c51
Author: jimczi <jim.ferenczi@elastic.co>
AuthorDate: Wed Sep 25 12:44:25 2019 +0200

    LUCENE-8984: Fix ut by cleaning up resources after test
---
 .../src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lucene/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java b/lucene/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java
index eb21d1e..1c246f5 100644
--- a/lucene/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java
+++ b/lucene/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java
@@ -183,6 +183,10 @@ public class TestMoreLikeThis extends LuceneTestCase {
     term = ((TermQuery) ((List<BooleanClause>) clauses).get(1).getQuery()).getTerm();
     assertTrue(term.text().equals("tenth"));
 
+    // clean up
+    reader.close();
+    dir.close();
+    analyzer.close();
   }
 
   public void testBoostFactor() throws Throwable {


Mime
View raw message