Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,14 @@ final class MiMoV26EncodedMediaIngressTests: XCTestCase {
XCTAssertEqual(owners.acquisitions,5)
XCTAssertEqual(actual.mtpMetricsSnapshot()?.draftedTokens,0,"media remains target-only")
for lease in owners.all { await lease.joinFromOutside() }
// The bridge returns the terminal before the row's native retirement
// (`EngineV2Bridge+Events`), and the leases are host ownership only, so
// the media reservation settles on the engine queue just after. Wait
// for it; a leaked reservation still fails here.
let settled = ContinuousClock.now + .seconds(10)
while value.transaction.managedMediaReservationCountForTesting != 0, ContinuousClock.now < settled {
try await Task.sleep(for: .milliseconds(5))
}
XCTAssertEqual(value.transaction.managedMediaReservationCountForTesting,0)
try await drain(value,bundle,actual)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ final class MiMoV26ManagedAudioProviderTests: XCTestCase {
phase("owner joined")
XCTAssertGreaterThan(actual.stepCount,before)
XCTAssertEqual(lease.snapshot().phase,.completed)
// The bridge returns the terminal before the row's native retirement
// (`EngineV2Bridge+Events`), and the lease is host ownership only, so
// the media reservation settles on the engine queue just after. Wait
// for it; a leaked reservation still fails here.
let settled = ContinuousClock.now + .seconds(10)
while value.transaction.managedMediaReservationCountForTesting != 0, ContinuousClock.now < settled {
try await Task.sleep(for: .milliseconds(5))
}
XCTAssertEqual(value.transaction.managedMediaReservationCountForTesting,0)
XCTAssertNil(actual.nativeCompletionFault)
let receipt = try await retire(value)
Expand Down
Loading