Skip to content

ExclusiveLockTransactionTestRunner

class

Namespace: Orleans.Transactions.TestKit

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public abstract class ExclusiveLockTransactionTestRunner : TransactionTestRunnerBase

Methods

  • ConcurrentReadThenWriteWithExclusiveLock_NoLockException(string) Verifies that using [UseExclusiveLock] on the read method prevents lock upgrade exceptions when concurrent transactions perform Read-then-Write on the same grain.
  • ConcurrentReadThenWriteWithoutExclusiveLock_ThrowsLockException(string) Verifies that concurrent Read-then-Write transactions on the same grain cause OrleansTransactionLockUpgradeException or OrleansBrokenTransactionLockException when no exclusive lock is used. Scenario (LockUpgradeException): TX1: PerformRead → shared lock acquired TX2: PerformRead → shared lock acquired (same group) TX1: PerformUpdate → lock upgrade fails Scenario (BrokenTransactionLockException): TX1: PerformRead → shared lock acquired TX2: PerformRead → shared lock acquired (same group) TX2: PerformUpdate → upgraded, TX1 rolled back TX1: PerformUpdate → broken lock detected