mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Handle media source validation more gracefully. (#3571)
* Handle media source validation more gracefully. * Fix unit tests.
This commit is contained in:
@@ -10,12 +10,12 @@ import MatrixRustSDK
|
||||
import XCTest
|
||||
|
||||
final class MediaLoaderTests: XCTestCase {
|
||||
func testMediaRequestCoalescing() async {
|
||||
func testMediaRequestCoalescing() async throws {
|
||||
let mediaLoadingClient = ClientSDKMock()
|
||||
mediaLoadingClient.getMediaContentMediaSourceReturnValue = Data()
|
||||
let mediaLoader = MediaLoader(client: mediaLoadingClient)
|
||||
|
||||
let mediaSource = MediaSourceProxy(url: .mockMXCFile, mimeType: nil)
|
||||
let mediaSource = try MediaSourceProxy(url: .mockMXCFile, mimeType: nil)
|
||||
|
||||
do {
|
||||
for _ in 1...10 {
|
||||
@@ -28,12 +28,12 @@ final class MediaLoaderTests: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
func testMediaThumbnailRequestCoalescing() async {
|
||||
func testMediaThumbnailRequestCoalescing() async throws {
|
||||
let mediaLoadingClient = ClientSDKMock()
|
||||
mediaLoadingClient.getMediaThumbnailMediaSourceWidthHeightReturnValue = Data()
|
||||
let mediaLoader = MediaLoader(client: mediaLoadingClient)
|
||||
|
||||
let mediaSource = MediaSourceProxy(url: .mockMXCImage, mimeType: nil)
|
||||
let mediaSource = try MediaSourceProxy(url: .mockMXCImage, mimeType: nil)
|
||||
|
||||
do {
|
||||
for _ in 1...10 {
|
||||
|
||||
Reference in New Issue
Block a user