Skip to content

Commit 7c4db9e

Browse files
[release/7.0.1xx] [tests] Ignore PassLibraryTest.PassLibraryTest on bots if PKPassLibrary.GetPasses returns null. Fixes #xamarin/maccore@2598. (#16806)
PKPassLibrary.GetPasses randomly returns null for no apparent rhyme or reason on our bots, so just ignore the test in that case. Maybe if someone can reproduce locally one day we'll be able to investigate and figure out what's happening. Fixes xamarin/maccore#2598. Backport of #16738 Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
1 parent 324ef96 commit 7c4db9e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/monotouch-test/PassKit/PassLibraryTest.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ public void Defaults ()
3838

3939
var library = new PKPassLibrary ();
4040
// not null (but empty by default) and there's no API to add them
41-
Assert.NotNull (library.GetPasses (), "GetPasses");
41+
var passes = library.GetPasses ();
42+
if (passes is null)
43+
TestRuntime.IgnoreInCI ("GetPasses () seems to randomly return null on our bots.");
44+
// If the following assert fails for you locally, please investigate! See https://github.com/xamarin/maccore/issues/2598.
45+
Assert.NotNull (passes, "GetPasses - if this assert fails for you locally, please investigate! See https://github.com/xamarin/maccore/issues/2598.");
4246

4347
using (var url = PassTest.GetBoardingPassUrl ()) {
4448
#if __MACCATALYST__

0 commit comments

Comments
 (0)