示例#1
0
        public void TestLocateReplica()
        {
            var replica = _vBucket.LocateReplica();

            Assert.IsNotNull(replica);

            var expected = _servers.Skip(1).First();

            Assert.AreSame(expected, replica);
        }
示例#2
0
        public void TestLocateReplica()
        {
            const int replicaIndex = 0;
            var       replica      = _vBucket.LocateReplica(replicaIndex);

            Assert.NotNull(replica);

            var expected = _vBucketServerMap.IPEndPoints[replicaIndex];

            Assert.Same(expected, replica);
        }
示例#3
0
        public void TestLocateReplica()
        {
            const int replicaIndex = 0;
            var       replica      = _vBucket.LocateReplica(replicaIndex);

            Assert.IsNotNull(replica);

            var expected = _servers[replicaIndex];

            Assert.AreSame(expected, replica);
        }
        public void TestLocateReplica()
        {
            const int replicaIndex = 0;
            var       replica      = _vBucket.LocateReplica(replicaIndex);

            Assert.IsNotNull(replica);

            var hostname = _vBucketServerMap.IPEndPoints[replicaIndex];
            var expected = _servers[hostname.Address];

            Assert.AreSame(expected, replica);
        }