|
@@ -33,6 +33,7 @@ import java.io.InputStreamReader;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.nio.file.FileSystemException;
|
|
|
import java.nio.file.Files;
|
|
|
+import java.nio.file.NoSuchFileException;
|
|
|
import java.nio.file.Path;
|
|
|
import java.nio.file.attribute.PosixFileAttributeView;
|
|
|
import java.nio.file.attribute.PosixFilePermission;
|
|
@@ -45,6 +46,7 @@ import static org.hamcrest.Matchers.containsString;
|
|
|
import static org.hamcrest.Matchers.equalTo;
|
|
|
import static org.hamcrest.Matchers.hasSize;
|
|
|
import static org.hamcrest.Matchers.hasToString;
|
|
|
+import static org.hamcrest.Matchers.instanceOf;
|
|
|
|
|
|
/**
|
|
|
* Create a simple "daemon controller", put it in the right place and check that it runs.
|
|
@@ -211,7 +213,11 @@ public class SpawnerNoBootstrapTests extends LuceneTestCase {
|
|
|
// we do not ignore these files on non-macOS systems
|
|
|
final FileSystemException e =
|
|
|
expectThrows(FileSystemException.class, () -> spawner.spawnNativePluginControllers(environment));
|
|
|
- assertThat(e, hasToString(containsString("Not a directory")));
|
|
|
+ if (Constants.WINDOWS) {
|
|
|
+ assertThat(e, instanceOf(NoSuchFileException.class));
|
|
|
+ } else {
|
|
|
+ assertThat(e, hasToString(containsString("Not a directory")));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|