| After some time spent on this task I couldn't reproduce the error mentioned in the description. However I'm still seeing the thing we could consider being an issue. If we change the URL to be invalid and run the tests, the tests are passing even if there's been an error thrown in the console:
Sending metrics ["timestamp": 1520434733582, "clientId": 5F766958-56E8-44E5-A9CA-84BD7EBF3FFC, "data": ["device": ["platformVersion": "11.2", "platform": "ios", "device": "iPhone"], "app": ["appVersion": 1.0, "sdkVersion": "DEVELOPMENT", "appId": org.aerogear.AeroGearSdkExample]]] |
2018-03-07 15:58:53.716275+0100 AeroGearSdkExample[27864:401708] TIC TCP Conn Failed [1:0x60000016e100]: 12:8 Err(-65554) |
2018-03-07 15:58:53.720200+0100 AeroGearSdkExample[27864:401707] Task <12167FA5-5BB5-4458-8C7D-D587F632E731>.<1> HTTP load failed (error code: -1003 [12:8]) |
2018-03-07 15:58:53.720541+0100 AeroGearSdkExample[27864:401707] Task <12167FA5-5BB5-4458-8C7D-D587F632E731>.<1> finished with error - code: -1003 |
2018-03-07 15:58:53.909 [Error] [MetricsNetworkPublisher.swift:21] publish > An error has occurred when sending app metrics: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x604000447f80 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=http://www.mockyd.io/v2/5a79c6572e000028009a5c4f, NSErrorFailingURLKey=http://www.mockyd.io/v2/5a79c6572e000028009a5c4f, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.} |
Test Suite 'Selected tests' started at 2018-03-07 15:58:55.134 |
Test Suite 'AeroGearSdkExampleTests.xctest' started at 2018-03-07 15:58:55.137 |
Test Suite 'MetricsServiceTest' started at 2018-03-07 15:58:55.139 |
Test Case '-[AeroGearSdkExampleTests.MetricsServiceTest testAppMetrics]' started. |
Test Case '-[AeroGearSdkExampleTests.MetricsServiceTest testAppMetrics]' passed (0.004 seconds). |
Test Suite 'MetricsServiceTest' passed at 2018-03-07 15:58:55.147. |
Executed 1 test, with 0 failures (0 unexpected) in 0.004 (0.008) seconds |
Test Suite 'AeroGearSdkExampleTests.xctest' passed at 2018-03-07 15:58:55.148. |
Executed 1 test, with 0 failures (0 unexpected) in 0.004 (0.010) seconds |
Test Suite 'Selected tests' passed at 2018-03-07 15:58:55.148. |
Executed 1 test, with 0 failures (0 unexpected) in 0.004 (0.014) seconds
|
Daniel Passos do you think this needs to be fixed in the scope of this ticket or is it more of a part of this one AEROGEAR-2286 ? |