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

-[MapViewTests testCompassTap] fails on iPhone 6 simulator #2920

Closed

Description

@1ec5

-[MapViewTests testCompassTap] consistently fails on iPhone 6 simulator when run independently, and sometimes when run with the entire test suite (as seen pretty often on Bitrise).

The test passes consistently if I add a call to [tester waitForAnimationsToFinish] anywhere before the first call to -[MGLMapView setDirection:animated:], whether in -testCompassTap or indeed up in -beforeEach; it also passes if I make that -setDirection:animated: call non-animated.

/cc @incanus @friedbunny

Activity

  1. added
    iOS
    on Nov 3, 2015
  2. added this to the ios-v3.0.0 milestone on Nov 3, 2015
  3. 1ec5 commented on Nov 4, 2015

    @1ec5
    ContributorAuthor

    This regression was introduced in #2769. It switched to calling -waitForAnimationsToFinish, which only knows to wait for native iOS animations. However, ever since #1829, we’ve driven the compass’ rotation by syncing its transform up with mbgl on every frame, not by using view-based animation. The only animation in play is for fading the compass, so we get lucky sometimes because KIF ends up waiting for the fade to complete.

    Ideally, we’d call things like -waitForTappableViewWithAccessibilityLabel: and -waitForAbsenceOfViewWithAccessibilityLabel:, but the compass is not accessible: see #1830.

  4. self-assigned this
    on Nov 4, 2015
  5. incanus commented on Nov 4, 2015

    @incanus
    Contributor

    Oh whoa, I didn’t know we switched that compass behavior.

  6. adam-mapbox commented on Nov 4, 2015

    @adam-mapbox
    Contributor

    I'd like to hop on a soapbox for a moment and comment that, in general, combining CA with raw OpenGL is probably unwise. That's a blanket statement, and with any blanket statement there are exceptions, but I think that in general we should be trying to move away from using Core Animation to do any animations and do everything with OpenGL. Not only does it make cross-platform easier, but it also keeps thing simple and avoids bugs like this. I do understand that some things will always be in CA to support various end user use cases.

  7. 1ec5 commented on Nov 4, 2015

    @1ec5
    ContributorAuthor

    This is simply a case of choosing the wrong KIF API. We’re planning to move off of KIF anyhow, but your comments are reflective of what @incanus has been trying to do in #1125 (comment).

  8. added a commit that references this issue on Nov 4, 2015
    4956c05
  9. added a commit that references this issue on Nov 6, 2015
    1eb4bbb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugiOStests

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions