ptupitsyn commented on a change in pull request #8110:
URL: https://github.com/apache/ignite/pull/8110#discussion_r464222441



##########
File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/EnumsTest.cs
##########
@@ -85,6 +86,11 @@ private static void CheckValue<T>(T val, bool isBinaryEnum = 
true)
                 {
                     Assert.AreEqual(string.Format("{0} [typeId={1}, 
enumValue={2}, enumValueName={3}]",
                         typeof(T).FullName, binRes.GetBinaryType().TypeId, 
binRes.EnumValue, val), binRes.ToString());
+
+                    var expectedEnumNames = 
Enum.GetValues(typeof(T)).OfType<T>().Select(x => x.ToString()).ToList();
+                    var actualEnumNames = 
binRes.GetBinaryType().GetEnumValues().Select(v => v.EnumName).ToList();

Review comment:
       I think I understand what you mean - since we cache enum values, we 
should always return the same collection. However, other nodes may have more 
values for the same enum (e.g. a newer code version). So the cache we 
introduced in this change is only for write operations. And when the user asks 
for all known enum values, we don't use the cache, but load them from the 
cluster.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to