File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,23 @@ final class MultiSearchTests: XCTestCase {
5050 let commonParams = MultiSearchParameters ( queryBy: " name " )
5151
5252 do {
53- let ( _, _) = try await client. collections. create ( schema: productSchema) //Creating test collection - Products
54- let ( _, _) = try await client. collections. create ( schema: brandSchema)
53+ do {
54+ let _ = try await client. collections. create ( schema: productSchema)
55+ } catch ResponseError . collectionAlreadyExists( let desc) {
56+ print ( desc)
57+ } catch ( let error) {
58+ print ( error. localizedDescription)
59+ XCTAssertTrue ( false )
60+ }
61+
62+ do {
63+ let _ = try await client. collections. create ( schema: brandSchema)
64+ } catch ResponseError . collectionAlreadyExists( let desc) {
65+ print ( desc)
66+ } catch ( let error) {
67+ print ( error. localizedDescription)
68+ XCTAssertTrue ( false )
69+ }
5570
5671 let ( _, _) = try await client. collection ( name: " products " ) . documents ( ) . create ( document: encoder. encode ( product1) )
5772
You can’t perform that action at this time.
0 commit comments