Skip to content

Commit f60beb5

Browse files
DYN-9702: Fix flaky PackageLoaderTests broken by shipped definitions folder (#17222)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent cc06630 commit f60beb5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/Libraries/PackageManagerTests/PackageLoaderTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ public void LoadingCustomNodeFromPackageSetsNodeInfoPackageInfoCorrectly()
595595
var matchingNodes = CurrentDynamoModel.CustomNodeManager.NodeInfos.Where(x =>
596596
{
597597
Console.WriteLine($"val {x.Value}, name {x.Value.Name}, pkginfo {x.Value.PackageInfo}, packagemember {x.Value.IsPackageMember}");
598-
return x.Value.PackageInfo.Equals(packageInfo);
598+
return x.Value.PackageInfo != null && x.Value.PackageInfo.Equals(packageInfo);
599599
}
600600
).ToList();
601601
//the node should have the correct package info and should be marked a packageMember.
@@ -763,7 +763,7 @@ public void PlacingCustomNodeInstanceFromPackageRetainsCorrectPackageInfoState()
763763
var matchingNodes = CurrentDynamoModel.CustomNodeManager.NodeInfos.Where(x =>
764764
{
765765
Console.WriteLine($"val{x.Value}, name{x.Value.Name}, pkginfo{x.Value.PackageInfo}, packagemember{x.Value.IsPackageMember}");
766-
return x.Value.PackageInfo.Equals(packageInfo);
766+
return x.Value.PackageInfo != null && x.Value.PackageInfo.Equals(packageInfo);
767767
}
768768
).ToList();
769769
//the node should have the correct package info and should be marked a packageMember.
@@ -773,7 +773,7 @@ public void PlacingCustomNodeInstanceFromPackageRetainsCorrectPackageInfoState()
773773
var cninst = CurrentDynamoModel.CustomNodeManager.CreateCustomNodeInstance(matchingNodes.FirstOrDefault().Key, null, true);
774774
this.CurrentDynamoModel.CurrentWorkspace.AddAndRegisterNode(cninst);
775775

776-
matchingNodes = CurrentDynamoModel.CustomNodeManager.NodeInfos.Where(x => x.Value.PackageInfo.Equals(packageInfo)).ToList();
776+
matchingNodes = CurrentDynamoModel.CustomNodeManager.NodeInfos.Where(x => x.Value.PackageInfo != null && x.Value.PackageInfo.Equals(packageInfo)).ToList();
777777
Assert.AreEqual(1, matchingNodes.Count);
778778
Assert.IsTrue(matchingNodes.All(x => x.Value.IsPackageMember == true));
779779

0 commit comments

Comments
 (0)