lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject lucene-solr:master: SOLR-12250: Remove the usage of mockito
Date Thu, 26 Apr 2018 10:57:52 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 1a18acd78 -> e331c068d


SOLR-12250: Remove the usage of mockito


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

Branch: refs/heads/master
Commit: e331c068df6ef40193e41c30f1ab1c7be82021c2
Parents: 1a18acd
Author: Cao Manh Dat <datcm@apache.org>
Authored: Thu Apr 26 17:57:41 2018 +0700
Committer: Cao Manh Dat <datcm@apache.org>
Committed: Thu Apr 26 17:57:41 2018 +0700

----------------------------------------------------------------------
 .../src/test/org/apache/solr/update/TransactionLogTest.java | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e331c068/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java b/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java
index 27383e7..1bf4ad4 100644
--- a/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java
+++ b/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java
@@ -23,23 +23,18 @@ import java.util.ArrayList;
 import java.util.Locale;
 
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrInputDocument;
 import org.junit.Test;
 
-import static org.mockito.Mockito.*;
-
 public class TransactionLogTest extends LuceneTestCase {
 
   @Test
   public void testBigLastAddSize() throws IOException {
-    SolrTestCaseJ4.assumeWorkingMockito();
     String tlogFileName = String.format(Locale.ROOT, UpdateLog.LOG_FILENAME_PATTERN, UpdateLog.TLOG_NAME,
0);
     try (TransactionLog transactionLog = new TransactionLog(Files.createTempFile(tlogFileName,
"").toFile(), new ArrayList<>())) {
       transactionLog.lastAddSize = 2000000000;
-      AddUpdateCommand updateCommand = mock(AddUpdateCommand.class);
-      when(updateCommand.isInPlaceUpdate()).thenReturn(false);
-      when(updateCommand.getSolrInputDocument()).thenReturn(new SolrInputDocument());
+      AddUpdateCommand updateCommand = new AddUpdateCommand(null);
+      updateCommand.solrDoc = new SolrInputDocument();
       transactionLog.write(updateCommand, 0);
     }
   }


Mime
View raw message