Exemple #1
0
        public void FailedHostIncreasesOnePointPerMinute()
        {
            _strategy = new TimeTravelTestScoreMirrorSelector(defaultHostPool);
            FailMultiplier(httpHost, 2);

            var host1 = _strategy.GetHost();

            Thread.Sleep(4000);
            var host2 = _strategy.GetHost();

            host1.Should().Be(rsyncHost, "because it should have higher score");
            host2.Should().Be(httpHost, "because it should have same score again");
        }
Exemple #2
0
        public void CanGetMirrorFromThePool()
        {
            var host = _strategy.GetHost();

            host.Should().Be(httpHost, "because it is the first in the list");
        }