lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject lucene-solr:branch_6x: LUCENE-7300: fix test bug to ensure the newly created file is in fact written through to the underlying filesystem even if NRTCachingDirectory is used
Date Mon, 30 May 2016 10:37:26 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 358d6f7e6 -> 979af2720


LUCENE-7300: fix test bug to ensure the newly created file is in fact written through to the
underlying filesystem even if NRTCachingDirectory is used


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

Branch: refs/heads/branch_6x
Commit: 979af27209a10b41857cbf6c7439472c3eca5983
Parents: 358d6f7
Author: Mike McCandless <mikemccand@apache.org>
Authored: Mon May 30 06:37:19 2016 -0400
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Mon May 30 06:37:19 2016 -0400

----------------------------------------------------------------------
 .../org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/979af272/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java
----------------------------------------------------------------------
diff --git a/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java
b/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java
index 819511b..388b2f0 100644
--- a/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java
+++ b/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.attribute.BasicFileAttributes;
+import java.util.Collections;
 
 import org.apache.lucene.codecs.CodecUtil;
 import org.apache.lucene.util.IOUtils;
@@ -51,6 +52,8 @@ public class TestHardLinkCopyDirectoryWrapper extends BaseDirectoryTestCase
{
         output.writeString("hey man, nice shot!");
         CodecUtil.writeFooter(output);
       }
+      // In case luceneDir_1 has an NRTCachingDirectory
+      luceneDir_1.sync(Collections.singleton("foo.bar"));
       try {
         Files.createLink(tempDir.resolve("test"), dir_1.resolve("foo.bar"));
         BasicFileAttributes destAttr = Files.readAttributes(tempDir.resolve("test"), BasicFileAttributes.class);


Mime
View raw message