Skip to content

Commit 91f32ae

Browse files
compnerdKyle-Ye
andauthored
Indexing: add a workaround for clearing the index (#647)
The unit tests will occasionally desire to clean up the generated index while retaining a reference to the NavigatorIndex instance. This is prevented on Windows as the LMDB environment will preserve an open handle which results in the index not being removed. Co-authored-by: Kyle <kyle201817146@gmail.com>
1 parent 06431a8 commit 91f32ae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Tests/SwiftDocCUtilitiesTests/ConvertActionTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,7 @@ class ConvertActionTests: XCTestCase {
19811981
let indexFromConvertAction = try NavigatorIndex.readNavigatorIndex(url: indexURL)
19821982
XCTAssertEqual(indexFromConvertAction.count, 37)
19831983

1984+
indexFromConvertAction.environment?.close()
19841985
try FileManager.default.removeItem(at: indexURL)
19851986

19861987
// Run just the index command over the built documentation

0 commit comments

Comments
 (0)