public void SpeculativeExecution_Should_Not_Schedule_More_Than_Once_On_A_Healthy_Cluster()
        {
            var policy    = new LoggedSpeculativeExecutionPolicy();
            var session   = GetSession(policy);
            var semaphore = new SemaphoreSlim(10);

            TestHelper.ParallelInvoke(() =>
            {
                semaphore.Wait();
                session.Execute(new SimpleStatement(QueryLocal).SetIdempotence(true));
                semaphore.Release();
            }, 512);
            Assert.AreEqual(0, policy.ScheduledMoreThanOnce.Count, "Scheduled more than once: [" + String.Join(", ", policy.ScheduledMoreThanOnce.Select(x => x.ToString())) + "]");
        }
 public LoggedSpeculativeExecutionPlan(LoggedSpeculativeExecutionPolicy policy)
 {
     _policy = policy;
 }
 public LoggedSpeculativeExecutionPlan(LoggedSpeculativeExecutionPolicy policy)
 {
     _policy = policy;
 }
 public void SpeculativeExecution_Should_Not_Schedule_More_Than_Once_On_A_Healthy_Cluster()
 {
     var policy = new LoggedSpeculativeExecutionPolicy();
     var session = GetSession(policy);
     var semaphore = new SemaphoreSlim(10);
     TestHelper.ParallelInvoke(() =>
     {
         semaphore.Wait();
         session.Execute(new SimpleStatement(QueryLocal).SetIdempotence(true));
         semaphore.Release();
     }, 512);
     Assert.AreEqual(0, policy.ScheduledMoreThanOnce.Count, "Scheduled more than once: [" + String.Join(", ", policy.ScheduledMoreThanOnce.Select(x => x.ToString())) + "]");
 }