public void TestIgniteGetVersionAndNodeVersionAreEqual() { IgniteProductVersion version = Ignite.GetVersion(); IgniteProductVersion nodeVersion = Ignite.GetCluster().GetLocalNode().Version; Assert.AreEqual(version, nodeVersion); }
public void TestBinaryConstructor() { IBinaryRawReader reader = SetUpRawBinaryReader(_defaultVersion.RevisionHash); IgniteProductVersion deserializedVersion = new IgniteProductVersion(reader); Assert.AreEqual(_defaultVersion, deserializedVersion); }
public void TestLocalNodeGetVersion() { IgniteProductVersion nodeVersion = Ignite.GetCluster().GetLocalNode().Version; Assert.GreaterOrEqual(nodeVersion.Major, 2); Assert.GreaterOrEqual(nodeVersion.Minor, 0); Assert.GreaterOrEqual(nodeVersion.Maintenance, 0); Assert.GreaterOrEqual(nodeVersion.Stage, "SNAPSHOT"); }
public void TestToStringWithLimitedHashValue() { var hash = new byte[] { 24, 229 }; IBinaryRawReader reader = SetUpRawBinaryReader(hash); IgniteProductVersion deserializedVersion = new IgniteProductVersion(reader); Assert.AreEqual("2.5.7#20180101-sha1:18", deserializedVersion.ToString()); }
public void TestAssemblyVersionMatchesIgniteVersion() { Version clientVer = typeof(IIgnite).Assembly.GetName().Version; IgniteProductVersion version = Ignite.GetVersion(); Assert.AreEqual(clientVer.Major, version.Major); Assert.AreEqual(clientVer.Minor, version.Minor); Assert.AreEqual(clientVer.Build, version.Maintenance); }
public void TestSignedByteArrayIsTheSameForStringRepresentation() { sbyte[] signed = Array.ConvertAll(ByteArray, b => unchecked ((sbyte)b)); // ReSharper disable once PossibleInvalidCastException var unsignedCast = (byte[])(Array)signed; var versionSigned = new IgniteProductVersion(1, 2, 3, "rc1", DefaultReleaseDate, unsignedCast); var versionUnsigned = new IgniteProductVersion(1, 2, 3, "rc1", DefaultReleaseDate, ByteArray); Assert.AreEqual(versionSigned.ToString(), versionUnsigned.ToString()); }
/// <summary> /// Initializes a new instance of the <see cref="ClientClusterNode"/> class. /// </summary> /// <param name="reader">The reader.</param> public ClientClusterNode(IBinaryRawReader reader) { var id = reader.ReadGuid(); Debug.Assert(id.HasValue); _id = id.Value; _attrs = ClusterNodeImpl.ReadAttributes(reader); _addrs = reader.ReadCollectionAsList <string>().AsReadOnly(); _hosts = reader.ReadCollectionAsList <string>().AsReadOnly(); _order = reader.ReadLong(); _isLocal = reader.ReadBoolean(); _isDaemon = reader.ReadBoolean(); _isClient = reader.ReadBoolean(); _consistentId = reader.ReadObject <object>(); _version = new IgniteProductVersion(reader); }
public void SetUp() { _defaultVersion = new IgniteProductVersion(2, 5, 7, "Stage", DefaultReleaseDate, null); }
public void TestUnsignedStringRepresentation() { var version = new IgniteProductVersion(1, 2, 3, "rc1", new DateTime(2019, 1, 1), ByteArray); Assert.AreEqual("1.2.3#20190101-sha1:18e5a7ec", version.ToString()); }