Ejemplo n.º 1
0
 public void SmallTtl(int locks, int threads, int operationsPerThread, TimestampProviderStochasticType stochasticType)
 {
     DoTest(new TestConfig
     {
         Locks = locks,
         OperationsPerThread      = operationsPerThread,
         FastRunningOpProbability = 1.00d,
         LongRunningOpProbability = 0.00d,
         SyncInterval             = null,
         TesterConfig             = new RemoteLockerTesterConfig
         {
             LockersCount           = threads,
             LocalRivalOptimization = LocalRivalOptimization.Disabled,
             LockTtl                         = TimeSpan.FromMilliseconds(2000),
             LockMetadataTtl                 = TimeSpan.FromSeconds(10),
             KeepLockAliveInterval           = TimeSpan.FromMilliseconds(50),
             ChangeLockRowThreshold          = int.MaxValue,
             TimestampProviderStochasticType = stochasticType,
             CassandraClusterSettings        = SingleCassandraNodeSetUpFixture.CreateCassandraClusterSettings(attempts: 1, timeout: TimeSpan.FromMilliseconds(350)),
             CassandraFailProbability        = null
         },
     });
 }
 public StochasticTimestampProvider(TimestampProviderStochasticType stochasticType, TimeSpan lockTtl)
 {
     this.stochasticType = stochasticType;
     this.lockTtl        = lockTtl;
 }