Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[build, ios] Add canary Xcode 10 CircleCI job #12911

Merged
merged 3 commits into from
Sep 20, 2018

Conversation

friedbunny
Copy link
Contributor

Fixes #12756. Updating to Xcode 10 proved to be slightly troublesome:

Let’s keep this build optional and let it run alongside the current Xcode 9.4.1 builds and, if it proves reliable, we can migrate the rest of the builds next week before ios-v4.5.0-alpha.2. We should do our best to publish ios-v4.5.0 with Xcode 10.

/cc @mapbox/maps-ios

@friedbunny friedbunny added iOS Mapbox Maps SDK for iOS build labels Sep 18, 2018
@friedbunny friedbunny added this to the ios-v4.5.0 milestone Sep 18, 2018
@friedbunny friedbunny self-assigned this Sep 18, 2018
@friedbunny
Copy link
Contributor Author

@fabian-guerra Looks like this is failing since I rebased to include #12791:

MGLOfflineStorageTests
  testAddFileContent, ((error) == nil) failed: "Error Domain=NSCocoaErrorDomain Code=4 "The file “barcelona.db” doesn’t exist." UserInfo={NSFilePath=/Users/distiller/Library/Developer/CoreSimulator/Devices/5B49D0FB-D8AE-415B-9DCF-74CB9419D69F/data/Documents/barcelona.db, NSUnderlyingError=0x7fb97cd117a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}" - Changing the file's permissions:/Users/distiller/Library/Developer/CoreSimulator/Devices/5B49D0FB-D8AE-415B-9DCF-74CB9419D69F/data/Documents/barcelona.db should not return an error.
  /Users/distiller/project/platform/darwin/test/MGLOfflineStorageTests.mm:306

        [fileManager setAttributes:atributes ofItemAtPath:filePath error:&error];
        XCTAssertNil(error, @"Changing the file's permissions:%@ should not return an error.", filePath);
        error = nil;

  testAddFileContent, ((fileSize) equal to (dabaseFileSize)) failed: ("0") is not equal to ("32391168") - The dabase file size must be: 0x1.fffb879b794p-1028ctual size:
  /Users/distiller/project/platform/darwin/test/MGLOfflineStorageTests.mm:314

        // Merging databases creates an empty file if the file does not exist at the given path.
        XCTAssertEqual(fileSize, dabaseFileSize, @"The dabase file size must be:%l actual size:%l", dabaseFileSize, fileSize);
        
  testAddFileContent, failed: caught "NSInvalidArgumentException", "The file path: file:///Users/distiller/Library/Developer/CoreSimulator/Devices/5B49D0FB-D8AE-415B-9DCF-74CB9419D69F/data/Documents/barcelona.db must be writable"
  /Users/distiller/project/platform/darwin/test/MGLOfflineStorageTests.mm:326

        MGLOfflineStorage *os = [MGLOfflineStorage sharedOfflineStorage];
        [os addContentsOfFile:filePath withCompletionHandler:^(NSURL *fileURL, NSArray<MGLOfflinePack *> * _Nullable packs, NSError * _Nullable error) {
            XCTAssertNotNil(fileURL, @"The fileURL should not be nil.");

@friedbunny friedbunny force-pushed the fb-circleci-xcode10-beta branch from bcd135b to d1856ac Compare September 20, 2018 20:43
@friedbunny
Copy link
Contributor Author

friedbunny commented Sep 20, 2018

Even after #12913, I’m still seeing the new offline tests fail:

MGLOfflineStorageTests
  testAddFileContent, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "add database content completion handler", "Expect change to 'packs' of <MGLOfflineStorage: 0x7fbb8a5b2a90>".
  /Users/distiller/project/platform/darwin/test/MGLOfflineStorageTests.mm:340

        }];
        [self waitForExpectationsWithTimeout:2 handler:nil];
        // Depending on the database it may update or add a pack. For this case specifically the offline database adds one pack.

  testAddFileContent, (([MGLOfflineStorage sharedOfflineStorage].packs.count) equal to (countOfPacks + 1)) failed: ("0") is not equal to ("1") - Adding contents of barcelona.db should add one pack.
  /Users/distiller/project/platform/darwin/test/MGLOfflineStorageTests.mm:342

        // Depending on the database it may update or add a pack. For this case specifically the offline database adds one pack.
        XCTAssertEqual([MGLOfflineStorage sharedOfflineStorage].packs.count, countOfPacks + 1, @"Adding contents of barcelona.db should add one pack.");
    }

This is happening on Xcode 9.4.1 and 10, so I’m starting to think this is a CircleCI performance problem. I’ll try bumping the timeout here (e566bfa) and rerunning.

[skip firebase]

Bump MGLOfflineStorageTests timeouts to 5 seconds
@friedbunny
Copy link
Contributor Author

@mapbox/maps-ios If tests pass again this time (after squashing), I’d like to go ahead and merge this.

@@ -314,9 +314,9 @@ - (void)testAddFileContent {

NSNumber *fileSizeNumber = [fileAttributes objectForKey:NSFileSize];
long long fileSize = [fileSizeNumber longLongValue];
long long dabaseFileSize = 32391168;
long long databaseFileSize = 32391168;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂thank you for catching this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants