You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2022/04/18 11:19:59 UTC

[lucene] branch branch_9x updated: LUCENE-10482 Bug Fix: Don't use Instant.now() as prefix for the temp dir name (#814)

This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 766c08e475b LUCENE-10482 Bug Fix: Don't use Instant.now() as prefix for the temp dir name (#814)
766c08e475b is described below

commit 766c08e475ba31e2f5b7e1cf491cdacbe276ab67
Author: Gautam Worah <wo...@gmail.com>
AuthorDate: Sun Apr 17 18:18:08 2022 -0700

    LUCENE-10482 Bug Fix: Don't use Instant.now() as prefix for the temp dir name (#814)
    
    * Don't use Instant.now() as prefix for the temp dir name
    
    * spotless
---
 .../taxonomy/directory/TestAlwaysRefreshDirectoryTaxonomyReader.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAlwaysRefreshDirectoryTaxonomyReader.java b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAlwaysRefreshDirectoryTaxonomyReader.java
index 822500b3630..754917d76be 100644
--- a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAlwaysRefreshDirectoryTaxonomyReader.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAlwaysRefreshDirectoryTaxonomyReader.java
@@ -21,7 +21,6 @@ import static org.apache.lucene.tests.mockfile.ExtrasFS.isExtra;
 
 import java.io.IOException;
 import java.nio.file.Path;
-import java.time.Instant;
 import java.util.List;
 import java.util.function.Function;
 import org.apache.lucene.facet.FacetTestCase;
@@ -53,7 +52,7 @@ public class TestAlwaysRefreshDirectoryTaxonomyReader extends FacetTestCase {
   private <T extends Throwable> void testAlwaysRefreshDirectoryTaxonomyReader(
       Function<Directory, DirectoryTaxonomyReader> dtrProducer, Class<T> exceptionType)
       throws IOException {
-    final Path taxoPath1 = createTempDir(String.valueOf(Instant.now()));
+    final Path taxoPath1 = createTempDir();
     final Directory dir1 = newFSDirectory(taxoPath1);
 
     final DirectoryTaxonomyWriter tw1 =
@@ -61,7 +60,7 @@ public class TestAlwaysRefreshDirectoryTaxonomyReader extends FacetTestCase {
     tw1.addCategory(new FacetLabel("a"));
     tw1.commit(); // commit1
 
-    final Path taxoPath2 = createTempDir(String.valueOf(Instant.now()));
+    final Path taxoPath2 = createTempDir();
     final Directory commit1 = newFSDirectory(taxoPath2);
     // copy all index files from dir1
     for (String file : dir1.listAll()) {