mirror of https://github.com/apache/lucene.git
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
This commit is contained in:
parent
10ebc099c8
commit
d322be52f2
|
@ -21,7 +21,6 @@ import static org.apache.lucene.tests.mockfile.ExtrasFS.isExtra;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.time.Instant;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import org.apache.lucene.facet.FacetTestCase;
|
import org.apache.lucene.facet.FacetTestCase;
|
||||||
|
@ -53,7 +52,7 @@ public class TestAlwaysRefreshDirectoryTaxonomyReader extends FacetTestCase {
|
||||||
private <T extends Throwable> void testAlwaysRefreshDirectoryTaxonomyReader(
|
private <T extends Throwable> void testAlwaysRefreshDirectoryTaxonomyReader(
|
||||||
Function<Directory, DirectoryTaxonomyReader> dtrProducer, Class<T> exceptionType)
|
Function<Directory, DirectoryTaxonomyReader> dtrProducer, Class<T> exceptionType)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
final Path taxoPath1 = createTempDir(String.valueOf(Instant.now()));
|
final Path taxoPath1 = createTempDir();
|
||||||
final Directory dir1 = newFSDirectory(taxoPath1);
|
final Directory dir1 = newFSDirectory(taxoPath1);
|
||||||
|
|
||||||
final DirectoryTaxonomyWriter tw1 =
|
final DirectoryTaxonomyWriter tw1 =
|
||||||
|
@ -61,7 +60,7 @@ public class TestAlwaysRefreshDirectoryTaxonomyReader extends FacetTestCase {
|
||||||
tw1.addCategory(new FacetLabel("a"));
|
tw1.addCategory(new FacetLabel("a"));
|
||||||
tw1.commit(); // commit1
|
tw1.commit(); // commit1
|
||||||
|
|
||||||
final Path taxoPath2 = createTempDir(String.valueOf(Instant.now()));
|
final Path taxoPath2 = createTempDir();
|
||||||
final Directory commit1 = newFSDirectory(taxoPath2);
|
final Directory commit1 = newFSDirectory(taxoPath2);
|
||||||
// copy all index files from dir1
|
// copy all index files from dir1
|
||||||
for (String file : dir1.listAll()) {
|
for (String file : dir1.listAll()) {
|
||||||
|
|
Loading…
Reference in New Issue