Skip to content

Commit

Permalink
Fix build and test failures
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
  • Loading branch information
nknize committed May 20, 2022
1 parent f68541d commit 0e118c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ com.carrotsearch.randomizedtesting.annotations.Seed @ Don't commit hardcoded see
com.carrotsearch.randomizedtesting.annotations.Repeat @ Don't commit hardcoded repeats

org.apache.lucene.codecs.Codec#setDefault(org.apache.lucene.codecs.Codec) @ Use the SuppressCodecs("*") annotation instead
org.apache.lucene.tests.util.LuceneTestCase$Slow @ Don't write slow tests
org.junit.Ignore @ Use AwaitsFix instead
org.apache.lucene.tests.util.LuceneTestCase$Nightly @ We don't run nightly tests at this point!
com.carrotsearch.randomizedtesting.annotations.Nightly @ We don't run nightly tests at this point!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import java.io.Closeable;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;
import java.nio.file.AccessDeniedException;
Expand Down Expand Up @@ -172,10 +171,8 @@ public void runTestRm(final boolean exception) throws IOException {
for (int i = 0; i < numberOfLocations; i++) {
if (exception && randomBoolean()) {
final Path location = createTempDir();
final FileSystem fs = new AccessDeniedWhileDeletingFileSystem(location.getFileSystem()).getFileSystem(
URI.create("file:///")
);
final Path wrapped = new FilterPath(location, fs);
final FilterFileSystemProvider ffsp = new AccessDeniedWhileDeletingFileSystem(location.getFileSystem());
final Path wrapped = ffsp.wrapPath(location);
locations[i] = wrapped.resolve(randomAlphaOfLength(8));
Files.createDirectory(locations[i]);
locationsThrowingException.add(locations[i]);
Expand Down Expand Up @@ -256,8 +253,8 @@ public FileChannel newFileChannel(final Path path, final Set<? extends OpenOptio

public void testFsyncAccessDeniedOpeningDirectory() throws Exception {
final Path path = createTempDir().toRealPath();
final FileSystem fs = new AccessDeniedWhileOpeningDirectoryFileSystem(path.getFileSystem()).getFileSystem(URI.create("file:///"));
final Path wrapped = new FilterPath(path, fs);
final FilterFileSystemProvider ffsp = new AccessDeniedWhileOpeningDirectoryFileSystem(path.getFileSystem());
final Path wrapped = ffsp.wrapPath(path);
if (Constants.WINDOWS) {
// no exception, we early return and do not even try to open the directory
IOUtils.fsync(wrapped, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public abstract class AnalysisFactoryTestCase extends OpenSearchTestCase {
.put("spanishpluralstem", Void.class)
// LUCENE-10352
.put("daitchmokotoffsoundex", Void.class)
.put("persianstem", Void.class)
.immutableMap();

static final Map<String, Class<?>> KNOWN_CHARFILTERS = new MapBuilder<String, Class<?>>()
Expand Down

0 comments on commit 0e118c4

Please sign in to comment.