Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix stuck tests on master branch #2285

Merged
merged 6 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Sources/Sentry/SentryCrashIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,11 @@ + (void)enrichScope:(SentryScope *)scope crashWrapper:(SentryCrashWrapper *)cras
NSString *locale = [[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleIdentifier];
[deviceData setValue:locale forKey:LOCALE_KEY];

#if SENTRY_HAS_UIDEVICE
// When running the SentryTestObserver the code gets stuck when accessing the
// UIScreen.mainScreen. We disable adding pixel height and width for now when the test
// configuration is TEST_CI. Ideally we somehow check here if we can access UIScreen.mainScreen,
// see https://github.com/getsentry/sentry-cocoa/issues/2284
#if SENTRY_HAS_UIDEVICE && !defined(TEST_CI)
[deviceData setValue:@(UIScreen.mainScreen.bounds.size.height) forKey:@"screen_height_pixels"];
[deviceData setValue:@(UIScreen.mainScreen.bounds.size.width) forKey:@"screen_width_pixels"];
#endif
Expand Down
2 changes: 1 addition & 1 deletion scripts/xcode-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ case $REF_NAME in
;;

*)
CONFIGURATION="Test"
CONFIGURATION="TestCI"
;;
esac

Expand Down