File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Tests/TransloaditKitTests Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,24 @@ class TransloaditKitTests: XCTestCase {
8989 }
9090
9191 func testConcurrentAssemblyCreation( ) throws {
92- let ( files , serverAssembly ) = try Network . prepareForUploadingFiles ( data : data )
93- let numFiles = files . count
94-
92+ let expect = expectation ( description : " Wait for all assemblies to be created " )
93+ expect . expectedFulfillmentCount = 10
94+
9595 DispatchQueue . concurrentPerform ( iterations: 10 ) { _ in
96- let _ = createAssembly ( files) { _ in }
96+ do {
97+ let ( files, serverAssembly) = try Network . prepareForUploadingFiles ( data: data)
98+ let numFiles = files. count
99+ let _ = createAssembly ( files) { _ in
100+ expect. fulfill ( )
101+ }
102+ } catch {
103+ XCTFail ( " Failed with error \( error) " )
104+ }
97105 }
106+
107+ wait ( for: [ expect] , timeout: 10 )
108+
109+ try transloadit. reset ( )
98110 }
99111
100112 func testCanReset( ) throws {
You can’t perform that action at this time.
0 commit comments