Skip to content

Commit

Permalink
Properly skip OnDemandBlockSnapshotIndexInputTests.testVariousBlockSi…
Browse files Browse the repository at this point in the history
…ze on Windows.

PR opensearch-project#5397 skipped this test in @before block but still
frequently throws a TestCouldNotBeSkippedException.  This is caused by the after block still executing and throwing  an exception
while cleaning the directory created at the path in @before.  Moving the assumption to the individual test prevents this exception by ensuring the path exists.

Signed-off-by: Marc Handalian <handalm@amazon.com>
  • Loading branch information
mch2 committed Dec 9, 2022
1 parent 67977a2 commit f2b182d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public class OnDemandBlockSnapshotIndexInputTests extends OpenSearchTestCase {

@Before
public void init() {
assumeFalse("Awaiting Windows fix https://github.com/opensearch-project/OpenSearch/issues/5396", Constants.WINDOWS);
transferManager = mock(TransferManager.class);
lockFactory = SimpleFSLockFactory.INSTANCE;
path = LuceneTestCase.createTempDir("OnDemandBlockSnapshotIndexInputTests");
Expand All @@ -69,6 +68,7 @@ public void clean() {
}

public void testVariousBlockSize() throws Exception {
assumeFalse("Awaiting Windows fix https://github.com/opensearch-project/OpenSearch/issues/5396", Constants.WINDOWS);
int fileSize = 29360128;
int blockSizeShift;

Expand Down

0 comments on commit f2b182d

Please sign in to comment.