Skip to content

Commit

Permalink
Apply review comments by coderabbitai
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenviewer committed Feb 5, 2025
1 parent 767514a commit 42deb95
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Tests/Benchmark/DocumentBenchmarkTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ final class DocumentBenchmarkTests: XCTestCase {

let root = try await(doc.getRoot().tree as? JSONTree)?.getIndexTree().root
let pbTreeNodes = Converter.toTreeNodes(root)
_ = try Converter.fromTreeNodes(pbTreeNodes)
let convertedTreeNodes = try Converter.fromTreeNodes(pbTreeNodes)
XCTAssertNotNil(convertedTreeNodes, "Tree conversion failed")
} catch {
XCTAssert(false, "\(error)")
XCTFail("Benchmark failed with error: \(error)")
}
}

Expand Down Expand Up @@ -256,7 +257,7 @@ final class DocumentBenchmarkTests: XCTestCase {
self.measure {
let exp = expectation(description: "measure")

Task {
Task { @MainActor in
await self.benchmarkTreeConvert(10000)
exp.fulfill()
}
Expand All @@ -269,7 +270,7 @@ final class DocumentBenchmarkTests: XCTestCase {
self.measure {
let exp = expectation(description: "measure")

Task {
Task { @MainActor in
await self.benchmarkTreeConvert(20000)
exp.fulfill()
}
Expand All @@ -282,7 +283,7 @@ final class DocumentBenchmarkTests: XCTestCase {
self.measure {
let exp = expectation(description: "measure")

Task {
Task { @MainActor in
await self.benchmarkTreeConvert(30000)
exp.fulfill()
}
Expand Down

0 comments on commit 42deb95

Please sign in to comment.