35
35
import org .apache .lucene .codecs .CodecUtil ;
36
36
import org .apache .lucene .store .IOContext ;
37
37
import org .apache .lucene .store .IndexOutput ;
38
- import org .apache .lucene .store .SimpleFSDirectory ;
38
+ import org .apache .lucene .store .NIOFSDirectory ;
39
39
import org .opensearch .common .Randomness ;
40
40
import org .opensearch .core .internal .io .IOUtils ;
41
41
import org .opensearch .env .Environment ;
@@ -192,7 +192,7 @@ public void testUpgradeNoop() throws Exception {
192
192
193
193
public void testFailWhenCannotConsumeSecretStream () throws Exception {
194
194
Path configDir = env .configFile ();
195
- SimpleFSDirectory directory = new SimpleFSDirectory (configDir );
195
+ NIOFSDirectory directory = new NIOFSDirectory (configDir );
196
196
try (IndexOutput indexOutput = directory .createOutput ("opensearch.keystore" , IOContext .DEFAULT )) {
197
197
CodecUtil .writeHeader (indexOutput , "opensearch.keystore" , 3 );
198
198
indexOutput .writeByte ((byte ) 0 ); // No password
@@ -220,7 +220,7 @@ public void testFailWhenCannotConsumeSecretStream() throws Exception {
220
220
221
221
public void testFailWhenCannotConsumeEncryptedBytesStream () throws Exception {
222
222
Path configDir = env .configFile ();
223
- SimpleFSDirectory directory = new SimpleFSDirectory (configDir );
223
+ NIOFSDirectory directory = new NIOFSDirectory (configDir );
224
224
try (IndexOutput indexOutput = directory .createOutput ("opensearch.keystore" , IOContext .DEFAULT )) {
225
225
CodecUtil .writeHeader (indexOutput , "opensearch.keystore" , 3 );
226
226
indexOutput .writeByte ((byte ) 0 ); // No password
@@ -249,7 +249,7 @@ public void testFailWhenCannotConsumeEncryptedBytesStream() throws Exception {
249
249
250
250
public void testFailWhenSecretStreamNotConsumed () throws Exception {
251
251
Path configDir = env .configFile ();
252
- SimpleFSDirectory directory = new SimpleFSDirectory (configDir );
252
+ NIOFSDirectory directory = new NIOFSDirectory (configDir );
253
253
try (IndexOutput indexOutput = directory .createOutput ("opensearch.keystore" , IOContext .DEFAULT )) {
254
254
CodecUtil .writeHeader (indexOutput , "opensearch.keystore" , 3 );
255
255
indexOutput .writeByte ((byte ) 0 ); // No password
@@ -276,7 +276,7 @@ public void testFailWhenSecretStreamNotConsumed() throws Exception {
276
276
277
277
public void testFailWhenEncryptedBytesStreamIsNotConsumed () throws Exception {
278
278
Path configDir = env .configFile ();
279
- SimpleFSDirectory directory = new SimpleFSDirectory (configDir );
279
+ NIOFSDirectory directory = new NIOFSDirectory (configDir );
280
280
try (IndexOutput indexOutput = directory .createOutput ("opensearch.keystore" , IOContext .DEFAULT )) {
281
281
CodecUtil .writeHeader (indexOutput , "opensearch.keystore" , 3 );
282
282
indexOutput .writeByte ((byte ) 0 ); // No password
@@ -362,7 +362,7 @@ public void testIllegalSettingName() throws Exception {
362
362
public void testBackcompatV1 () throws Exception {
363
363
assumeFalse ("Can't run in a FIPS JVM as PBE is not available" , inFipsJvm ());
364
364
Path configDir = env .configFile ();
365
- SimpleFSDirectory directory = new SimpleFSDirectory (configDir );
365
+ NIOFSDirectory directory = new NIOFSDirectory (configDir );
366
366
try (IndexOutput output = directory .createOutput ("opensearch.keystore" , IOContext .DEFAULT )) {
367
367
CodecUtil .writeHeader (output , "opensearch.keystore" , 1 );
368
368
output .writeByte ((byte ) 0 ); // hasPassword = false
@@ -393,7 +393,7 @@ public void testBackcompatV1() throws Exception {
393
393
public void testBackcompatV2 () throws Exception {
394
394
assumeFalse ("Can't run in a FIPS JVM as PBE is not available" , inFipsJvm ());
395
395
Path configDir = env .configFile ();
396
- SimpleFSDirectory directory = new SimpleFSDirectory (configDir );
396
+ NIOFSDirectory directory = new NIOFSDirectory (configDir );
397
397
byte [] fileBytes = new byte [20 ];
398
398
random ().nextBytes (fileBytes );
399
399
try (IndexOutput output = directory .createOutput ("opensearch.keystore" , IOContext .DEFAULT )) {
0 commit comments