@@ -306,19 +306,19 @@ class IndexTests: OnlineTestCase {
306306 ]
307307 index. addObjects ( objects, completionHandler: { ( content, error) -> Void in
308308 guard let content = content else {
309- XCTFail ( " Error during addObjetcs: \( error) " )
309+ XCTFail ( String ( describing : error) )
310310 expectation. fulfill ( )
311311 return
312312 }
313313 self . index. waitTask ( withID: content [ " taskID " ] as! Int , completionHandler: { ( content, error) -> Void in
314314 guard error == nil else {
315- XCTFail ( " Error during waitTask: \( error) " )
315+ XCTFail ( String ( describing : error) )
316316 expectation. fulfill ( )
317317 return
318318 }
319319 self . index. getObjects ( withIDs: [ " 1 " , " 2 " ] , attributesToRetrieve: [ " name " , " nonexistent " ] , completionHandler: { ( content, error) -> Void in
320320 guard let content = content else {
321- XCTFail ( " Error during getObjects: \( error) " )
321+ XCTFail ( String ( describing : error) )
322322 expectation. fulfill ( )
323323 return
324324 }
@@ -1110,20 +1110,20 @@ class IndexTests: OnlineTestCase {
11101110 index. searchCacheExpiringTimeInterval = timeout
11111111 index. addObjects ( objects) { ( content, error) in
11121112 guard error == nil else {
1113- XCTFail ( " Error during addObjects: \( error) " )
1113+ XCTFail ( String ( describing : error) )
11141114 expectation. fulfill ( )
11151115 return
11161116 }
11171117 self . index. waitTask ( withID: content![ " taskID " ] as! Int ) { ( content, error) in
11181118 guard error == nil else {
1119- XCTFail ( " Error during waitTask: \( error) " )
1119+ XCTFail ( String ( describing : error) )
11201120 expectation. fulfill ( )
11211121 return
11221122 }
11231123 // Search a first time: there should be no cache.
11241124 self . index. search ( Query ( ) ) { ( content, error) in
11251125 guard error == nil else {
1126- XCTFail ( " Error during search #1: \( error) " )
1126+ XCTFail ( String ( describing : error) )
11271127 expectation. fulfill ( )
11281128 return
11291129 }
@@ -1136,7 +1136,7 @@ class IndexTests: OnlineTestCase {
11361136 // Search a second time with the same query: we should hit the cache and not return an error.
11371137 self . index. search ( Query ( ) ) { ( content, error) in
11381138 guard error == nil else {
1139- XCTFail ( " Error during search #2: \( error) " )
1139+ XCTFail ( String ( describing : error) )
11401140 expectation. fulfill ( )
11411141 return
11421142 }
0 commit comments