You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/06/06 08:53:07 UTC
[1/2] lucene-solr:branch_7x: SOLR-12250: Create the temporary tlog
file properly
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 754483b51 -> 0cfa798f8
SOLR-12250: Create the temporary tlog file properly
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/df98a76f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/df98a76f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/df98a76f
Branch: refs/heads/branch_7x
Commit: df98a76f8a858d95ed3ea08ffc3e03a4a150e2e9
Parents: 754483b
Author: Cao Manh Dat <da...@apache.org>
Authored: Wed Jun 6 15:50:19 2018 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Wed Jun 6 15:51:29 2018 +0700
----------------------------------------------------------------------
.../test/org/apache/solr/update/TransactionLogTest.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/df98a76f/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 d2b4b26..100d4d9 100644
--- a/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java
+++ b/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java
@@ -17,8 +17,10 @@
package org.apache.solr.update;
+import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
+import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Locale;
@@ -29,9 +31,11 @@ import org.junit.Test;
public class TransactionLogTest extends LuceneTestCase {
@Test
- public void testBigLastAddSize() throws IOException {
- 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<>())) {
+ public void testBigLastAddSize() {
+ String tlogFileName = String.format(Locale.ROOT, UpdateLog.LOG_FILENAME_PATTERN, UpdateLog.TLOG_NAME, Long.MAX_VALUE);
+ Path path = createTempDir();
+ File logFile = new File(path.toFile(), tlogFileName);
+ try (TransactionLog transactionLog = new TransactionLog(logFile, new ArrayList<>())) {
transactionLog.lastAddSize = 2000000000;
AddUpdateCommand updateCommand = new AddUpdateCommand(null);
updateCommand.solrDoc = new SolrInputDocument();
[2/2] lucene-solr:branch_7x: SOLR-12250: Fix precommit
Posted by da...@apache.org.
SOLR-12250: Fix precommit
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0cfa798f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0cfa798f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0cfa798f
Branch: refs/heads/branch_7x
Commit: 0cfa798f8a96637405c4b6bee9a56b6c47eb52ea
Parents: df98a76
Author: Cao Manh Dat <da...@apache.org>
Authored: Wed Jun 6 15:52:15 2018 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Wed Jun 6 15:52:56 2018 +0700
----------------------------------------------------------------------
solr/core/src/test/org/apache/solr/update/TransactionLogTest.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0cfa798f/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 100d4d9..66ecbc6 100644
--- a/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java
+++ b/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java
@@ -18,8 +18,6 @@
package org.apache.solr.update;
import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Locale;